summaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools/importers/ingest.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2020-02-18 22:08:21 -0800
committerBryan Newbold <bnewbold@robocracy.org>2020-02-18 22:08:21 -0800
commitc1fdc9e25cfa6e24277b3e84c3a4bd36ab61e314 (patch)
tree506eba1f7b0840a8709341d408348c3baaa0e39b /python/fatcat_tools/importers/ingest.py
parent4cbc94cd708c1db80a232150ab2cf56dddf83e62 (diff)
downloadfatcat-c1fdc9e25cfa6e24277b3e84c3a4bd36ab61e314.tar.gz
fatcat-c1fdc9e25cfa6e24277b3e84c3a4bd36ab61e314.zip
ingest importer: pass through link rel
Diffstat (limited to 'python/fatcat_tools/importers/ingest.py')
-rw-r--r--python/fatcat_tools/importers/ingest.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/python/fatcat_tools/importers/ingest.py b/python/fatcat_tools/importers/ingest.py
index fdaba176..bc2b4515 100644
--- a/python/fatcat_tools/importers/ingest.py
+++ b/python/fatcat_tools/importers/ingest.py
@@ -137,7 +137,12 @@ class IngestFileResultImporter(EntityImporter):
if not 'terminal_dt' in terminal:
terminal['terminal_dt'] = terminal['dt']
assert len(terminal['terminal_dt']) == 14
- url = make_rel_url(terminal['terminal_url'], self.default_link_rel)
+
+ default_rel = self.default_link_rel
+ if request.get('link_source') == 'doi':
+ default_rel = 'publisher'
+ default_rel = request.get('rel', default_rel)
+ url = make_rel_url(terminal['terminal_url'], default_rel)
if not url:
self.counts['skip-url'] += 1