# npx ezs 02-download.ini append = pack [use] plugin = basics plugin = conditor [TXTConcat] [replace] path = q value = self().trim() [CORHALFetch] url = https://corhal-api.inist.fr retries = 3 timeout = 60000 [assign] # Récupère electronicPublicationDate et publicationDate # Prend la plus ancienne (= la plus petite) # Ne garde que l'année path = ApilPublicationDate value = get("host.electronicPublicationDate", "9999") \ .castArray() \ .concat(_.get(self, "host.publicationDate", "9999")) \ .min().toString() \ .thru(str => str.substring(0,4)) [assign] path = ApilFinancement value = get('funders').castArray().filter(Boolean).thru(arr => Boolean(arr.length)) # Quand les RNSR ne sont pas fournis dans authors.*.affiliations.*.rnsr # on utilise les enrichments.rnsr et on les met au même niveau dans ApilRnsr [map] path = authors [map/map] path = affiliations [map/map/assign] path = ApilRnsr value = get("rnsr") [map/map/swing] test = get("ApilRnsr").isEmpty() [map/map/swing/assign] path = ApilRnsr value = get("enrichments.rnsr", []) \ .filter(rnsr => !["200612821P", "200018571R", "199812965F", "201523784S"].includes(rnsr)) # On rassemble tous les RNSR au niveau de la notice (ceux en provenance de # authors.*.rnsr et ceux en provenance de authors.*.affiliations.*.ApilRnsr) # dans allAuthorsRnsr [assign] path = allAuthorsRnsr value = get("authors").map("rnsr").flatten().uniq().filter(Boolean) [assign] path = allApilRnsr value = get("authors").map("affiliations").flatten().map("ApilRnsr").flatten() [assign] path = ApilAllRnsr value = get("allAuthorsRnsr").concat(self.allApilRnsr).uniq().filter(Boolean) # Garde un identifiant [assign] path = sourceUidChain value = get("business.sourceUidChain") # Supprime les champs inutiles pour les études bibliométriques [exchange] value = omit(['business','origins','technical', 'allAuthorsRnsr', 'allApilRnsr'])