# Usage: npx ezs -e enrich-institutes.ini # To see the enriched notices: # $ fx < data/corpus-simple-instituts.json '.filter(o => o.ws.rnsr[0]?.length)' [use] # JSONParse URLConnect FILELoad FILESave plugin = basics # expand plugin = analytics [exchange] value = [ "corpus-simple-etab.json" ] [JSONParse] [FILELoad] location = data [JSONParse] #2 - Instituts du CNRS [assign] path = ws.rnsr_id value = get("ws.rnsr").map(structs => structs.map(struct => struct.num_nat_struct)).flatten() [assign] path = ws.instituts value = get("ws.rnsr_id") [expand] path = ws.instituts size = 1 [expand/exploding] [expand/expand] path = value size = 100 [expand/expand/URLConnect] url = https://mapping-tools.services.inist.fr/v1/rnsr/instituts-cnrs/json retries = 3 timeout = 600000 noerror = true [expand/aggregate] [assign] path = ws.instituts value = get('ws.instituts').uniq() [dump] indent = true [FILESave] location = data identifier = corpus-simple-instituts.json [dump] indent = true