summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-09-28 13:27:34 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-09-28 13:27:34 -0700
commitcc92797003bd83af10e6ddec04b62a6c0f3ab7df (patch)
treece72fe783129cd63673cde4d75d22393ad5362c5
parent9e13c0c403c5d4b650f0dbaf11783733cfb4593b (diff)
downloadfatcat-cc92797003bd83af10e6ddec04b62a6c0f3ab7df.tar.gz
fatcat-cc92797003bd83af10e6ddec04b62a6c0f3ab7df.zip
sprinkle in TODOs for crossref importer
-rw-r--r--python/fatcat/crossref_importer.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/python/fatcat/crossref_importer.py b/python/fatcat/crossref_importer.py
index 10efe59c..bab3fe2f 100644
--- a/python/fatcat/crossref_importer.py
+++ b/python/fatcat/crossref_importer.py
@@ -160,6 +160,7 @@ class FatcatCrossrefImporter(FatcatImporter):
for key in ('subject', 'type', 'license', 'alternative-id',
'container-title', 'original-title', 'subtitle', 'archive',
'funder', 'group-title'):
+ # TODO: unpack "container-title" array
val = obj.get(key)
if val:
extra[key] = val
@@ -169,6 +170,7 @@ class FatcatCrossrefImporter(FatcatImporter):
extra['license'][i]['start'] = extra['license'][i]['start']['date-time']
if len(obj['title']) > 1:
extra['other-titles'] = obj['title'][1:]
+ # TODO: this should be top-level
extra['is_kept'] = len(obj.get('archive', [])) > 0
# ISBN