summaryrefslogtreecommitdiffstats
path: root/python/client.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/client.py')
-rwxr-xr-xpython/client.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/python/client.py b/python/client.py
index ca6af603..4f6d3ccc 100755
--- a/python/client.py
+++ b/python/client.py
@@ -18,6 +18,10 @@ def run_import_orcid(args):
foi = FatcatOrcidImporter(args.host_url)
foi.process_batch(args.json_file, size=args.batch_size)
+def run_import_issn(args):
+ fii = FatcatIssnImporter(args.host_url)
+ fii.process_batch(args.csv_file, size=args.batch_size)
+
def run_import_manifest(args):
fmi = FatcatManifestImporter(args.host_url)
fmi.process_db(args.db_path, size=args.batch_size)
@@ -55,6 +59,15 @@ def main():
help="size of batch to send",
default=50, type=int)
+ sub_import_issn = subparsers.add_parser('import-issn')
+ sub_import_issn.set_defaults(func=run_import_issn)
+ sub_import_issn.add_argument('csv_file',
+ help="Journal ISSN CSV metadata file to import from (or stdin)",
+ default=sys.stdin, type=argparse.FileType('r'))
+ sub_import_issn.add_argument('--batch-size',
+ help="size of batch to send",
+ default=50, type=int)
+
sub_import_manifest = subparsers.add_parser('import-manifest')
sub_import_manifest.set_defaults(func=run_import_manifest)
sub_import_manifest.add_argument('db_path',