Skip to content

Commit 1182a31

Browse files
committed
world_scientific: adds missing attach_fulltext function
Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
1 parent 88731f2 commit 1182a31

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

harvestingkit/edpsciences_package.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,6 @@ def _attach_fulltext(self, rec, doi):
483483
('d', 'Fulltext')])
484484

485485

486-
487486
if __name__ == '__main__':
488487
filename = sys.argv[1]
489488
edp = EDPSciencesPackage()

harvestingkit/world_scientific_package.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
from __future__ import print_function
2121

22+
import os
2223
import sys
2324

2425
from xml.dom.minidom import parse
@@ -45,6 +46,7 @@ class WorldScientific(JatsPackage):
4546

4647
def __init__(self, journal_mappings={}):
4748
"""Create instance of WorldScientific package."""
49+
self.url_prefix = "http://www.worldscientific.com/doi/pdf"
4850
super(WorldScientific, self).__init__(journal_mappings)
4951

5052
def _get_date(self):
@@ -256,6 +258,13 @@ def get_record(self, filename, ref_extract_callback=None):
256258
sys.stderr.write(message)
257259
return ""
258260

261+
def _attach_fulltext(self, rec, doi):
262+
"""Attach fulltext FFT."""
263+
url = os.path.join(self.url_prefix, doi)
264+
record_add_field(rec, 'FFT',
265+
subfields=[('a', url),
266+
('t', 'INSPIRE-PUBLIC'),
267+
('d', 'Fulltext')])
259268
if __name__ == '__main__':
260269
filename = sys.argv[1]
261270
ws = WorldScientific()

0 commit comments

Comments
 (0)