summaryrefslogtreecommitdiffstats
path: root/python/fatcat_import.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-05-15 10:42:20 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-05-15 10:42:20 -0700
commit4d56e71598457489e9f71ef4ce5c9b0254a4cce1 (patch)
tree3608a12e9b5f221d3667989843ee24324efa948f /python/fatcat_import.py
parentffee70b116f2683ca24e8046144fa078f2964774 (diff)
downloadfatcat-4d56e71598457489e9f71ef4ce5c9b0254a4cce1.tar.gz
fatcat-4d56e71598457489e9f71ef4ce5c9b0254a4cce1.zip
fix default mimetype (impacted pre-1923 files)
Diffstat (limited to 'python/fatcat_import.py')
-rwxr-xr-xpython/fatcat_import.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/python/fatcat_import.py b/python/fatcat_import.py
index c421fb43..6b1a10b1 100755
--- a/python/fatcat_import.py
+++ b/python/fatcat_import.py
@@ -29,7 +29,8 @@ def run_journal_metadata(args):
def run_matched(args):
fmi = MatchedImporter(args.api,
edit_batch_size=args.batch_size,
- editgroup_description=args.editgroup_description_override)
+ editgroup_description=args.editgroup_description_override,
+ default_mimetype=args.default_mimetype)
JsonLinePusher(fmi, args.json_file).run()
def run_arabesque_match(args):
@@ -168,6 +169,9 @@ def main():
sub_matched.add_argument('json_file',
help="JSON file to import from (or stdin)",
default=sys.stdin, type=argparse.FileType('r'))
+ sub_matched.add_argument('--default-mimetype',
+ default=None,
+ help="default mimetype for imported files (if not specified per-file)")
sub_matched.add_argument('--bezerk-mode',
action='store_true',
help="don't lookup existing files, just insert (clobbers; only for fast bootstrap)")