diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2020-01-06 16:54:30 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2020-01-06 16:54:30 -0800 |
commit | b289da087453f13571c5570d6be4a3fb4ac08acd (patch) | |
tree | 2dc3a46afa072be3a248d2115cf02f5dcbb7253c /python/fatcat_import.py | |
parent | 3a57c35ddcf794d7211d1649e74a9917bd1c9495 (diff) | |
download | fatcat-b289da087453f13571c5570d6be4a3fb4ac08acd.tar.gz fatcat-b289da087453f13571c5570d6be4a3fb4ac08acd.zip |
importers: control update behavior with more-standard flag
Diffstat (limited to 'python/fatcat_import.py')
-rwxr-xr-x | python/fatcat_import.py | 6 |
1 files changed, 5 insertions, 1 deletions
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") |