Newer
Older
web-dumps / corhal-dumps / corhal-hal-green-json.ini
@Nicolas Thouvenin Nicolas Thouvenin on 6 Sep 2022 1 KB :feat: inport corham dumps scripts
[use]
plugin = basics
plugin = conditor
plugin = lodex

[env]
path = currentDate
value = thru(() => new Date()).thru(d => d.getDay()).thru(i => ['Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi'][i]).thru(m => env('Startup') ? 'Startup' : m)

;
;
; Notices de 2014-2022 (jusqu'à maintenant) :
;          - **présentes** dans HAL
;          - sans lien vers un document plein text
;          - identifié par Unpaywall comme étant en open access
;          - identifié par Unpaywall comme étant en open access GREEN
; 
; fichier généré au format json
;
;
[replace]
path = q
value = fix('business.sources:hal AND business.hasFulltext:false AND enrichments.openAccess.unpaywall.isOa:true AND enrichments.openAccess.unpaywall.oaStatus:green')

[CORHALFetch]
url = https://corhal-api.inist.fr
retries = 3
timeout = 60000

[replace]
path = url
value = get('business.sourceUidChain').prepend('https://corhal-api.inist.fr/mergedDocuments/')

[URLFetch]
url = get('url')
json = true
target = result
timeout = 60000
noerror = true

[exchange]
value = get('result')

[dump]
indent = true

[FILESave]
location = fix(`${env('PWD')}/public/${env('FileName')}`)
identifier = fix(`${env('FileName')}-${env('currentDate')}.json`)
compress = true

[exchange]
value = get('filename').append(' generated.')

[dump]
indent = true