summaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools/importers/grobid_metadata.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-01-23 21:08:36 -0800
committerBryan Newbold <bnewbold@robocracy.org>2019-01-23 21:08:36 -0800
commitad9cd8a98aa5dce24d49b5a9c460a653f5e840a3 (patch)
tree54ea1dde0f831265550dbe66a7ccc867a83b80ce /python/fatcat_tools/importers/grobid_metadata.py
parent4fd244c2b1dd393d5b26607f99777a678a78c781 (diff)
downloadfatcat-ad9cd8a98aa5dce24d49b5a9c460a653f5e840a3.tar.gz
fatcat-ad9cd8a98aa5dce24d49b5a9c460a653f5e840a3.zip
importer bugfixes
Diffstat (limited to 'python/fatcat_tools/importers/grobid_metadata.py')
-rw-r--r--python/fatcat_tools/importers/grobid_metadata.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/python/fatcat_tools/importers/grobid_metadata.py b/python/fatcat_tools/importers/grobid_metadata.py
index 468b0ede..9d95fe0b 100644
--- a/python/fatcat_tools/importers/grobid_metadata.py
+++ b/python/fatcat_tools/importers/grobid_metadata.py
@@ -32,6 +32,7 @@ class GrobidMetadataImporter(EntityImporter):
editgroup_description=eg_desc,
editgroup_extra=eg_extra)
self.default_link_rel = kwargs.get("default_link_rel", "web")
+ self.longtail_oa = kwargs.get("longtail_oa", False)
def want(self, raw_record):
return True
@@ -130,12 +131,13 @@ class GrobidMetadataImporter(EntityImporter):
if obj.get('doi'):
extra['doi'] = obj['doi']
if obj['journal'] and obj['journal'].get('name'):
- extra['container_name'] = obj['journal']['name']
-
- extra['is_longtail_oa'] = True
+ extra['container_name'] = clean(obj['journal']['name'])
# TODO: ISSN/eISSN handling? or just journal name lookup?
+ if self.longtail_oa:
+ extra['longtail_oa'] = True
+
if extra:
extra = dict(grobid=extra)
else: