From cee8d9d27533ff01a7be175c44e227bfb7521f7e Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 28 Aug 2019 18:04:00 +0200 Subject: improvements to chocula importer --- python/fatcat_tools/importers/chocula.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'python/fatcat_tools') 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 -- cgit v1.2.3