let manual-collate automatically deduce the work id from the paths
This commit is contained in:
parent
6c94a346c4
commit
e1b2741253
|
@ -202,7 +202,9 @@ def collate(args):
|
|||
con.close()
|
||||
|
||||
def manual_collate(args):
|
||||
collation_dir = args.destdir / 'site' / 'images' / args.work_id
|
||||
work_id = args.paths[0].relative_to(args.destdir / 'extract').parents[-2].name
|
||||
|
||||
collation_dir = args.destdir / 'site' / 'images' / work_id
|
||||
if collation_dir.exists() and len(list(collation_dir.iterdir())) > 0:
|
||||
print(f'Collation directory already exists!')
|
||||
return
|
||||
|
@ -346,7 +348,6 @@ parser_collate.add_argument(
|
|||
parser_collate.set_defaults(func=collate)
|
||||
|
||||
parser_manual_collate = subparsers.add_parser('manual-collate', help='collate a specific work manually, specifying all paths to include')
|
||||
parser_manual_collate.add_argument('work_id')
|
||||
parser_manual_collate.add_argument(
|
||||
'paths',
|
||||
metavar='PATH',
|
||||
|
|
Loading…
Reference in a new issue