# Usage: npx ezs enrich-rnsr.ini < data/corpus-simple.json > data/corpus-simple-rnsr.json
# To see the enriched notices:
# $ fx < data/corpus-simple-rnsr.json '.filter(o => o.ws.rnsr[0]?.length)'
[use]
# JSONParse URLConnect
plugin = basics
# aggregate exploding
plugin = analytics
[JSONParse]
[assign]
path = ws.rnsr
value = get('affiliations').map(address => ({ year: _.get(self, 'publication_year'), address}))
[expand]
path = ws.rnsr
size = 100
[expand/exploding]
[expand/URLConnect]
url = https://affiliations-tools.services.istex.fr/v1/rnsr/info
retries = 3
timeout = 6000000
noerror = true
[expand/aggregate]
[dump]
indent = true