Newer
Older
giec-wos / harvest-from-doi.ini
; Usage: npx ezs harvest-from-doi.ini < dois.txt

; Inspiré de https://gitbucket.inist.fr/tdm/web-services/blob/master/biblio-tools/v1/wos/works/expand.ini

[use]
plugin = @ezs/basics
plugin = @ezs/analytics

# Flow configuration
[TXTParse]

[env]
; Maximum 90 (théoriquement 100, mais un DOI peut renvoyer plusieurs notices)
path = size
value = 10

path = indent
value = true

path = token
value = env('WOS_API_KEY')

[replace]
path = value
value = toLower().replace(/-$/, "").replace(/"/g, "").replace(/;subjmeta=\d+$/,"")

[group]
size = env('size')

[replace]
path = dois
value = self().map('value').filter(Boolean).map(x => JSON.stringify(x)).join(' OR ')

[replace]
path = usrQuery
value = fix('DO=(', self.dois ,')').join('')

path = databaseId
value = WOK

path = count
value = env('size')

path = firstRecord
value = 1

# Maximum 1 request by second
[throttle]
bySecond = 1

[debug]

[URLStream]
url = https://wos-api.clarivate.com/api/wos/
header = env('token').prepend('X-ApiKey:')
path = Data.Records.records.REC.*
timeout = 50000
noerror = true
retries = 1

[dump]
indent = env('indent')