aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools/importers
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-08-28 18:04:00 +0200
committerBryan Newbold <bnewbold@robocracy.org>2019-09-03 13:31:49 -0700
commitcee8d9d27533ff01a7be175c44e227bfb7521f7e (patch)
tree93e7aff0e33c5fb065bb662b9737a4941f71b81c /python/fatcat_tools/importers
parent228f780f84249cfda9dddd5487c0966f242342c9 (diff)
downloadfatcat-cee8d9d27533ff01a7be175c44e227bfb7521f7e.tar.gz
fatcat-cee8d9d27533ff01a7be175c44e227bfb7521f7e.zip
improvements to chocula importer
Diffstat (limited to 'python/fatcat_tools/importers')
-rw-r--r--python/fatcat_tools/importers/chocula.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/python/fatcat_tools/importers/chocula.py b/python/fatcat_tools/importers/chocula.py
index 4ca8bd21..348b3d3b 100644
--- a/python/fatcat_tools/importers/chocula.py
+++ b/python/fatcat_tools/importers/chocula.py
@@ -50,7 +50,8 @@ class ChoculaImporter(EntityImporter):
name = "Proceedings of the " + name.split(',')[0]
extra = dict()
- for k in ('urls', 'webarchive_urls', 'issne', 'issnp', 'country', 'sherpa_romeo'):
+ for k in ('urls', 'webarchive_urls', 'issne', 'issnp', 'country',
+ 'sherpa_romeo', 'ezb', 'szczepanski', 'languages'):
if row['extra'].get(k):
extra[k] = row['extra'][k]
@@ -117,6 +118,11 @@ class ChoculaImporter(EntityImporter):
'sherpa_romeo', 'ezb', 'szczepanski'):
if ce.extra.get(k):
existing.extra[k] = ce.extra[k]
+ if ce.extra.get('languages'):
+ if not existing.extra.get('languages'):
+ existing.extra['languages'] = ce.extra['languages']
+ elif not ce.extra['languages'][0] in existing.extra['languages']:
+ existing.extra['languages'].append(ce.extra['languages'][0])
self.api.update_container(self.get_editgroup_id(), existing.ident, existing)
self.counts['update'] += 1