summaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools/importers/grobid_metadata.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-01-08 14:59:38 -0800
committerBryan Newbold <bnewbold@robocracy.org>2019-01-08 14:59:38 -0800
commit8c930ded07b6a668bc1721ef98312d9259c06b59 (patch)
treece31708556d17d7165a64f15d0dac78d881e80bc /python/fatcat_tools/importers/grobid_metadata.py
parentd1862ea4a6dcb781713ffc54bdc4bd7d7cdbdb9e (diff)
downloadfatcat-8c930ded07b6a668bc1721ef98312d9259c06b59.tar.gz
fatcat-8c930ded07b6a668bc1721ef98312d9259c06b59.zip
importers and tests all use new api-passing
Diffstat (limited to 'python/fatcat_tools/importers/grobid_metadata.py')
-rw-r--r--python/fatcat_tools/importers/grobid_metadata.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/python/fatcat_tools/importers/grobid_metadata.py b/python/fatcat_tools/importers/grobid_metadata.py
index 2cb97b01..5e61a154 100644
--- a/python/fatcat_tools/importers/grobid_metadata.py
+++ b/python/fatcat_tools/importers/grobid_metadata.py
@@ -12,9 +12,16 @@ MAX_ABSTRACT_BYTES=4096
class GrobidMetadataImporter(FatcatImporter):
- def __init__(self, host_url, default_link_rel="web"):
- super().__init__(host_url)
- self.default_link_rel = default_link_rel
+ def __init__(self, api, **kwargs):
+
+ eg_desc = kwargs.get('editgroup_description',
+ "Import of release and file metadata, as extracted from PDFs by GROBID.")
+ eg_extra = kwargs.get('editgroup_extra', dict())
+ eg_extra['agent'] = eg_extra.get('agent', 'fatcat_tools.GrobidMetadataImporter')
+ super().__init__(api,
+ editgroup_description=eg_desc,
+ editgroup_extra=eg_extra)
+ self.default_link_rel = kwargs.get("default_link_rel", "web")
def parse_grobid_json(self, obj):