diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-09-23 21:24:33 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-09-23 21:24:33 -0700 |
commit | ac8dbbfbf7e0c90f10acafa16f20d1a254fd913e (patch) | |
tree | 16184965bfa2fcd55aaaddf4af51fbd001da7613 /python | |
parent | 91eb3a7a9e7fdb1b344462d5bfb3e826320dc431 (diff) | |
download | fatcat-ac8dbbfbf7e0c90f10acafa16f20d1a254fd913e.tar.gz fatcat-ac8dbbfbf7e0c90f10acafa16f20d1a254fd913e.zip |
add author sequence metadata to contribs
Diffstat (limited to 'python')
-rw-r--r-- | python/fatcat/crossref_importer.py | 8 |
1 files 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', '<blank>') - 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, |