From b289da087453f13571c5570d6be4a3fb4ac08acd Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 6 Jan 2020 16:54:30 -0800 Subject: importers: control update behavior with more-standard flag --- python/fatcat_import.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'python/fatcat_import.py') diff --git a/python/fatcat_import.py b/python/fatcat_import.py index 8d82dab3..184dcc0a 100755 --- a/python/fatcat_import.py +++ b/python/fatcat_import.py @@ -61,7 +61,8 @@ def run_journal_metadata(args): def run_chocula(args): fii = ChoculaImporter(args.api, - edit_batch_size=args.batch_size) + edit_batch_size=args.batch_size, + do_updates=args.do_updates) JsonLinePusher(fii, args.json_file).run() def run_matched(args): @@ -301,6 +302,9 @@ def main(): sub_chocula.add_argument('json_file', help="chocula JSON entities file (or stdin)", default=sys.stdin, type=argparse.FileType('r')) + sub_chocula.add_argument('--do-updates', + action='store_true', + help="update pre-existing container entities") sub_matched = subparsers.add_parser('matched', help="add file entities matched against existing releases; custom JSON format") -- cgit v1.2.3