Add easybake command.

This commit is contained in:
voussoir 2020-10-17 19:18:25 -07:00
parent a463e5451b
commit dd581a8274

View file

@ -47,6 +47,12 @@ def digest_directory_argparse(args):
if args.autoyes or getpermission.getpermission('Commit?'): if args.autoyes or getpermission.getpermission('Commit?'):
photodb.commit() photodb.commit()
def easybake_argparse(args):
photodb = find_photodb()
for eb_string in args.eb_strings:
notes = photodb.easybake(eb_string)
photodb.commit()
def purge_deleted_photos_argparse(args): def purge_deleted_photos_argparse(args):
photodb = find_photodb() photodb = find_photodb()
for deleted in photodb.purge_deleted_files(): for deleted in photodb.purge_deleted_files():
@ -154,6 +160,10 @@ def main(argv):
continue continue
mode.append(arg) mode.append(arg)
p_easybake = subparsers.add_parser('easybake')
p_easybake.add_argument('eb_strings', nargs='+')
p_easybake.set_defaults(func=easybake_argparse)
p_tag_breplace = subparsers.add_parser('tag_breplace') p_tag_breplace = subparsers.add_parser('tag_breplace')
p_tag_breplace.add_argument('replace_from') p_tag_breplace.add_argument('replace_from')
p_tag_breplace.add_argument('replace_to') p_tag_breplace.add_argument('replace_to')