[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
; - respectant les contraintes CCSD d'import (possédant un code RNSR et une catégorie scientifique)
;
; 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 business.authorsRnsr:* \
AND classifications.enrichments.hal.code:* \
')
[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
[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