aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-05-22 15:59:14 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-05-22 15:59:14 -0700
commita9752a685be5a0ff7794ba652ca7954cb7508124 (patch)
tree45a996b19d4216fe5b5b173448861acf77073358
parentbe86ebbdcee910f3187305470440189331a16911 (diff)
downloadfatcat-a9752a685be5a0ff7794ba652ca7954cb7508124.tar.gz
fatcat-a9752a685be5a0ff7794ba652ca7954cb7508124.zip
make pubmed ref lookups configurable
-rwxr-xr-xpython/fatcat_import.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/python/fatcat_import.py b/python/fatcat_import.py
index 02a3441f..21e40750 100755
--- a/python/fatcat_import.py
+++ b/python/fatcat_import.py
@@ -34,7 +34,8 @@ def run_arxiv(args):
def run_pubmed(args):
pi = PubmedImporter(args.api,
args.issn_map_file,
- edit_batch_size=args.batch_size)
+ edit_batch_size=args.batch_size,
+ lookup_refs=(not args.no_lookup_refs))
if args.kafka_mode:
raise NotImplementedError
#KafkaBs4XmlPusher(pi, args.kafka_hosts, args.kafka_env, "api-pubmed", "fatcat-import").run()
@@ -167,6 +168,9 @@ def main():
sub_crossref.add_argument('--extid-map-file',
help="DOI-to-other-identifiers sqlite3 database",
default=None, type=str)
+ sub_crossref.add_argument('--no-lookup-refs',
+ action='store_true',
+ help="skip lookup of references (PMID or DOI)")
sub_crossref.add_argument('--kafka-mode',
action='store_true',
help="consume from kafka topic (not stdin)")
@@ -212,6 +216,9 @@ def main():
sub_pubmed.add_argument('issn_map_file',
help="ISSN to ISSN-L mapping file",
default=None, type=argparse.FileType('r'))
+ sub_pubmed.add_argument('--no-lookup-refs',
+ action='store_true',
+ help="skip lookup of references (PMID or DOI)")
sub_pubmed.add_argument('--kafka-mode',
action='store_true',
help="consume from kafka topic (not stdin)")