From ac8dbbfbf7e0c90f10acafa16f20d1a254fd913e Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Sun, 23 Sep 2018 21:24:33 -0700 Subject: add author sequence metadata to contribs --- python/fatcat/crossref_importer.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/python/fatcat/crossref_importer.py b/python/fatcat/crossref_importer.py index 99fed8d5..1adc6d70 100644 --- a/python/fatcat/crossref_importer.py +++ b/python/fatcat/crossref_importer.py @@ -64,14 +64,18 @@ class FatcatCrossrefImporter(FatcatImporter): else: # TODO: defaults back to a pseudo-null value raw_name = am.get('given', '') - extra = None + extra = dict() if ctype == "author": index = i else: index = None if am.get('affiliation'): # note: affiliation => affiliations - extra = dict(affiliations=am.get('affiliation')) + extra['affiliations'] = am.get('affiliation') + if am.get('sequence') and am.get('sequence') != "additional": + extra['sequence'] = am.get('sequence') + if not extra: + extra = None contribs.append(fatcat_client.ReleaseContrib( creator_id=creator_id, index=index, -- cgit v1.2.3