Add attachment loader

This commit is contained in:
nolash
2021-10-09 19:56:29 +02:00
parent 12c3cd84a9
commit fad433cd55
9 changed files with 203 additions and 1 deletions

15
cic/cmd/add.py Normal file
View 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()

View File

@@ -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()