aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_import.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-09-12 11:06:06 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-09-12 11:06:06 -0700
commit722e4321bfa6431136b1e03f0c9e4ac11903c4df (patch)
treefb688bf672f209616b0f8049b4749cbe8da0d3fa /python/fatcat_import.py
parent1db3bbe11139cee2034cc3f632d13bcce2c03a89 (diff)
downloadfatcat-722e4321bfa6431136b1e03f0c9e4ac11903c4df.tar.gz
fatcat-722e4321bfa6431136b1e03f0c9e4ac11903c4df.zip
extid support for crossref importer
Diffstat (limited to 'python/fatcat_import.py')
-rwxr-xr-xpython/fatcat_import.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/python/fatcat_import.py b/python/fatcat_import.py
index 2804a210..2f0c746f 100755
--- a/python/fatcat_import.py
+++ b/python/fatcat_import.py
@@ -10,7 +10,7 @@ from fatcat.issn_importer import FatcatIssnImporter
def run_import_crossref(args):
fci = FatcatCrossrefImporter(args.host_url, args.issn_map_file,
- create_containers=(not args.no_create_containers))
+ args.extid_map_file, create_containers=(not args.no_create_containers))
fci.process_batch(args.json_file, size=args.batch_size)
def run_import_orcid(args):
@@ -46,7 +46,10 @@ def main():
default=sys.stdin, type=argparse.FileType('r'))
sub_import_crossref.add_argument('issn_map_file',
help="ISSN to ISSN-L mapping file",
- default=sys.stdin, type=argparse.FileType('r'))
+ default=None, type=argparse.FileType('r'))
+ sub_import_crossref.add_argument('extid_map_file',
+ help="DOI-to-other-identifiers sqlite3 database",
+ default=None, type=argparse.FileType('r'))
sub_import_crossref.add_argument('--no-create-containers',
action='store_true',
help="skip creation of new container entities based on ISSN")