summaryrefslogtreecommitdiffstats
path: root/fatcat_client.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-04-25 13:45:53 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-04-25 13:54:43 -0700
commit840966fcd3170bce4961bd5a51727af1be38e5ea (patch)
treebddc52b1d823910d85aef9e939b4d54986e3b912 /fatcat_client.py
parent8c7258205fad8230e236709c20469ff390426cbf (diff)
downloadfatcat-840966fcd3170bce4961bd5a51727af1be38e5ea.tar.gz
fatcat-840966fcd3170bce4961bd5a51727af1be38e5ea.zip
have crossref script create containers
Diffstat (limited to 'fatcat_client.py')
-rwxr-xr-xfatcat_client.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/fatcat_client.py b/fatcat_client.py
index d20400e7..d1580be5 100755
--- a/fatcat_client.py
+++ b/fatcat_client.py
@@ -5,7 +5,8 @@ from fatcat.api_client import FatCatApiClient
def import_crossref(args):
fcc = FatCatApiClient(args.host_url)
- fcc.import_crossref_file(args.json_file)
+ fcc.import_crossref_file(args.json_file,
+ create_containers=args.create_containers)
def health(args):
fcc = FatCatApiClient(args.host_url)
@@ -25,7 +26,10 @@ def main():
aliases=['ic'])
sub_import_crossref.set_defaults(func=import_crossref)
sub_import_crossref.add_argument('json_file',
- help="")
+ help="crossref JSON file to import from")
+ sub_import_crossref.add_argument('--create-containers',
+ action='store_true',
+ help="if true, create containers based on ISSN")
sub_health = subparsers.add_parser('health')
sub_health.set_defaults(func=health)