summaryrefslogtreecommitdiffstats
path: root/python/fatcat_import.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-01-17 13:48:59 -0800
committerBryan Newbold <bnewbold@robocracy.org>2019-01-17 13:48:59 -0800
commit8a36af1664f0399f29a57b639dc0c89033578878 (patch)
treecb35bd1fdf329431820db688dd94b62c842d9ac5 /python/fatcat_import.py
parent3c56a6c8da155f4675e48a6f5fa55b1cf9fb096a (diff)
downloadfatcat-8a36af1664f0399f29a57b639dc0c89033578878.tar.gz
fatcat-8a36af1664f0399f29a57b639dc0c89033578878.zip
issn => journal_metadata in several places
Diffstat (limited to 'python/fatcat_import.py')
-rwxr-xr-xpython/fatcat_import.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/python/fatcat_import.py b/python/fatcat_import.py
index 0e176b2c..ed12416c 100755
--- a/python/fatcat_import.py
+++ b/python/fatcat_import.py
@@ -6,7 +6,7 @@
import os, sys, argparse
from fatcat_tools import authenticated_api
from fatcat_tools.importers import CrossrefImporter, OrcidImporter, \
- IssnImporter, MatchedImporter, GrobidMetadataImporter, make_kafka_consumer
+ JournalMetadataImporter, MatchedImporter, GrobidMetadataImporter, make_kafka_consumer
def run_crossref(args):
@@ -27,8 +27,8 @@ def run_orcid(args):
foi.process_batch(args.json_file, size=args.batch_size)
foi.describe_run()
-def run_issn(args):
- fii = IssnImporter(args.api)
+def run_journal_metadata(args):
+ fii = JournalMetadataImporter(args.api)
fii.process_csv_batch(args.csv_file, size=args.batch_size)
fii.describe_run()
@@ -98,15 +98,15 @@ def main():
help="size of batch to send",
default=50, type=int)
- sub_issn = subparsers.add_parser('issn')
- sub_issn.set_defaults(
- func=run_issn,
- auth_var="FATCAT_AUTH_WORKER_ISSN",
+ sub_journal_metadata = subparsers.add_parser('journal-metadata')
+ sub_journal_metadata.set_defaults(
+ func=run_journal_metadata,
+ auth_var="FATCAT_AUTH_WORKER_JOURNAL_METADATA",
)
- sub_issn.add_argument('csv_file',
+ sub_journal_metadata.add_argument('csv_file',
help="Journal ISSN CSV metadata file to import from (or stdin)",
default=sys.stdin, type=argparse.FileType('r'))
- sub_issn.add_argument('--batch-size',
+ sub_journal_metadata.add_argument('--batch-size',
help="size of batch to send",
default=50, type=int)