Add attachment loader
This commit is contained in:
15
cic/cmd/add.py
Normal file
15
cic/cmd/add.py
Normal file
@@ -0,0 +1,15 @@
|
||||
# local imports
|
||||
from cic.attachment import Attachment
|
||||
|
||||
def process_args(argparser):
|
||||
argparser.add_argument('-f', '--file', type=str, help='add file')
|
||||
argparser.add_argument('-d', '--directory', type=str, dest='directory', default='.', help='directory')
|
||||
|
||||
|
||||
def validate_args(args):
|
||||
pass
|
||||
|
||||
|
||||
def execute(config, eargs):
|
||||
ca = Attachment(eargs.directory)
|
||||
ca.load()
|
||||
@@ -1,5 +1,11 @@
|
||||
# standard imports
|
||||
import logging
|
||||
import os
|
||||
|
||||
# local imports
|
||||
from cic import Proof
|
||||
from cic.meta import Meta
|
||||
from cic.attachment import Attachment
|
||||
|
||||
logg = logging.getLogger(__name__)
|
||||
|
||||
@@ -13,4 +19,12 @@ def validate_args(args):
|
||||
|
||||
|
||||
def execute(config, eargs):
|
||||
pass
|
||||
os.makedirs(eargs.directory)
|
||||
|
||||
cp = Proof(eargs.directory)
|
||||
cm = Meta(eargs.directory)
|
||||
ca = Attachment(eargs.directory)
|
||||
|
||||
cp.start()
|
||||
cm.start()
|
||||
ca.start()
|
||||
|
||||
Reference in New Issue
Block a user