Newer
Older
web-dumps / conditor-dumps / 02-download.ini
; 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]

path = doi
value = get("doi","")

path = abstract
value = get("abstract.default")

path = title
value = get("title.default")

path = halClassification
value = get("classifications.enrichments.hal.fr")

path = keywordsAuthorsAndMesh
value = get("keywords.en").pick(["author", "mesh"]).values().flatten()

path = conferenceDetails
value = fix([self.host.conference.name,self.host.conference.date,self.host.conference.place,self.host.conference.country]).compact().join(" ")

path = volumeIssueAndPages
value = fix(`${self.host.volume} / ${self.host.issue} / ${self.host.pages.range}`).replace(/undefined/gmi,"")

path = issn
value = get("host.issn","")

path = eissn
value = get("host.eissn","")

path = isbn
value = get("host.isbn","")

path = language
value = get("host.language")


; Récupère electronicPublicationDate et publicationDate
; Prend la plus ancienne (= la plus petite)
; Ne garde que l'année
path = publicationYear
value = get("host.electronicPublicationDate", "9999").castArray().concat(_.get(self, "host.publicationDate", "9999")).min().toString().thru(str => str.substring(0,4))
[assign]
path = isFunded
value = get("funders").castArray().filter(Boolean).size().thru(size => size > 0 ? "Oui" : "Non")

path = funders
value = get("funders").map("fullname")
; Quand les RNSR ne sont pas fournis dans authors.*.affiliations.*.rnsr
; on utilise les enrichissements et on les met au même niveau dans codesRnsr
[map]
path = authors
[map/map]
path = affiliations
[map/map/assign]
path = ApilRnsr1
value = get("rnsr")
[map/map/swing]
test = get("ApilRnsr1").isEmpty()
[map/map/swing/assign]
path = codesRnsr
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.*)
; dans allAuthorsRnsr
[assign]
path=ApilRnsr2
value= get("authors").map("rnsr").flatten()
[assign]
path = allApilRnsr1
; value= get("authors").map("affiliations").map("ApilRnsr1")
value= get("authors").flatMap("affiliations").flatMap("ApilRnsr1")
[assign]
path= codesRnsr
value= get("allApilRnsr1").concat(self.ApilRnsr2).compact().uniq()
; Garde un identifiant
[assign]
path = sourceUidChain
value = get("business.sourceUidChain")
;On ajoute un objet pour attribuer 'OA - Inconnu' aux null ou undefined
path = enrichments.openAccess.unpaywall.oaLocations
value = get("enrichments.openAccess.unpaywall.oaLocations",[{"hostType":"OA - Inconnu"}])

;Réduction des objets authors pour ne conserver que les propriétés utiles
path=authors
value=get("authors").map(item => _.assign(_.pick(item, ["fullname", "rnsr"]),{ affiliations: item.affiliations.map(aff => _.omit(aff,["isni", "idRef","ref"])) }))
; Supprime les champs inutiles pour les études bibliométriques
[exchange]
value = omit(["bibCode","ird","arxiv","inspire","articleNumber","business","origins","technical","allApilRnsr1","ApilRnsr2","keywords","classifications"])