aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_import.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2020-12-16 23:49:09 -0800
committerBryan Newbold <bnewbold@robocracy.org>2020-12-17 23:03:08 -0800
commitb2f53077bd05a536b5fdb551755a559b653421d3 (patch)
tree1de40b893f0798377c0af92a4dada3278e4d1f2d /python/fatcat_import.py
parentd312ddfa0340b702ac858b08f8f91f785048af0b (diff)
downloadfatcat-b2f53077bd05a536b5fdb551755a559b653421d3.tar.gz
fatcat-b2f53077bd05a536b5fdb551755a559b653421d3.zip
dblp release importer: container_id lookup TSV, and dump JSON mode
Diffstat (limited to 'python/fatcat_import.py')
-rwxr-xr-xpython/fatcat_import.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/python/fatcat_import.py b/python/fatcat_import.py
index 5ee81b92..90b53e5c 100755
--- a/python/fatcat_import.py
+++ b/python/fatcat_import.py
@@ -275,9 +275,10 @@ def run_doaj_article(args):
def run_dblp_release(args):
dwi = DblpReleaseImporter(args.api,
- args.issn_map_file,
+ dblp_container_map_file=args.dblp_container_map_file,
edit_batch_size=args.batch_size,
do_updates=args.do_updates,
+ dump_json_mode=args.dump_json_mode,
)
Bs4XmlLargeFilePusher(
dwi,
@@ -660,12 +661,15 @@ def main():
sub_dblp_release.add_argument('xml_file',
help="File with DBLP XML to import from",
default=sys.stdin, type=argparse.FileType('rb'))
- sub_dblp_release.add_argument('--issn-map-file',
- help="ISSN to ISSN-L mapping file",
+ sub_dblp_release.add_argument('--dblp-container-map-file',
+ help="file path to dblp prefix to container_id TSV file",
default=None, type=argparse.FileType('r'))
sub_dblp_release.add_argument('--do-updates',
action='store_true',
help="update any pre-existing release entities")
+ sub_dblp_release.add_argument('--dump-json-mode',
+ action='store_true',
+ help="print release entities to stdout instead of importing")
sub_dblp_release.set_defaults(
func=run_dblp_release,
auth_var="FATCAT_AUTH_WORKER_DBLP",