aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_import.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/fatcat_import.py')
-rwxr-xr-xpython/fatcat_import.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/python/fatcat_import.py b/python/fatcat_import.py
index de5b4202..c421fb43 100755
--- a/python/fatcat_import.py
+++ b/python/fatcat_import.py
@@ -28,7 +28,8 @@ def run_journal_metadata(args):
def run_matched(args):
fmi = MatchedImporter(args.api,
- edit_batch_size=args.batch_size)
+ edit_batch_size=args.batch_size,
+ editgroup_description=args.editgroup_description_override)
JsonLinePusher(fmi, args.json_file).run()
def run_arabesque_match(args):
@@ -115,6 +116,9 @@ def main():
parser.add_argument('--batch-size',
help="size of batch to send",
default=50, type=int)
+ parser.add_argument('--editgroup-description-override',
+ help="editgroup description override",
+ default=None, type=str)
subparsers = parser.add_subparsers()
sub_crossref = subparsers.add_parser('crossref')
@@ -249,6 +253,12 @@ def main():
print("tell me what to do!")
sys.exit(-1)
+ # allow editgroup description override via env variable (but CLI arg takes
+ # precedence)
+ if not args.editgroup_description_override \
+ and os.environ.get('FATCAT_EDITGROUP_DESCRIPTION'):
+ args.editgroup_description_override = os.environ.get('FATCAT_EDITGROUP_DESCRIPTION')
+
args.api = authenticated_api(
args.host_url,
# token is an optional kwarg (can be empty string, None, etc)