diff --git a/affiliations-rnsr/.env b/affiliations-rnsr/.env deleted file mode 100644 index e69de29..0000000 --- a/affiliations-rnsr/.env +++ /dev/null diff --git a/affiliations-rnsr/README.md b/affiliations-rnsr/README.md deleted file mode 100644 index 13457cd..0000000 --- a/affiliations-rnsr/README.md +++ /dev/null @@ -1,156 +0,0 @@ -# affiliations-rnsr - -> ⚠️ Ce service web a été intégré à [affiliations-tools](../affiliations-tools/README.md). -> Il est maintenant obsolète. - -L'instance `affiliations-rnsr` utilise l'application ezmaster -[`lodex-workers`](https://github.com/Inist-CNRS/lodex-workers). - -Elle offre un service qui déduit de l'adresse d'une affiliation d'auteur et -d'une date de publication (l'année suffit) zéro, un ou plusieurs identifiants -RNSR (correspondant à une ou plusieurs structures de recherche française(s)). - -Cet appariement suit des [règles -certaines](https://github.com/Inist-CNRS/ezs/blob/master/packages/conditor/README.md#r%C3%A8gles-certaines). - -## Configuration - -Il faut préciser dans le fichier de configuration de l'instance qu'elle utilise des paquets nodes: - -- `@ezs/basics` -- `@ezs/conditor` - -Bien sûr, les dernières versions sont préférables. - -Exemple: - -```json -{ - "packages": [ - "@ezs/basics@1.13.2", - "@ezs/conditor@2.2.2" - ] -} -``` - -## Utilisation - -- [v1/csv](#v1%2fcsv) -- [v1/json](#v1%2fjson) -- [v1/conditor](#v1%2fconditor) - -### v1/csv - -Prend un fichier CSV, avec des colonnes nommées `Adresse` et `Année`, et renvoie -un CSV avec la colonne supplémentaire `RNSR`. - -Les colonnes doivent être séparées par des tabulations, des points-virgules ou -des virgules. - -### Exemple CSV - -```bash -cat < *Remarque : Quand aucun identifiant n'est trouvé, un tableau vide est -> renvoyé.* - -### Paramètres de v1/json - -| nom | description | -| ------ | -------------------------------------------------- | -| indent | `true` ou `false`, indente le JSON résultat ou non | - -### Exemple JSON - -```bash -cat < ([array[0]+char]), [""]) - -path = authors -value = get("Adresse").toArray("Chaîne").reduce((s,c) => [{affiliations:[{address:s[0].affiliations[0].address+c}]}], [{affiliations:[{address:""}]}]) - -[affAlign] - -[replace] -path = Année -value = get("xPublicationDate") - -path = Adresse -value = get("authors.0.affiliations.0.address") - -path = RNSR -value = get("authors.0.affiliations.0.conditorRnsr") - -[CSVString] diff --git a/affiliations-rnsr/v1/json.ini b/affiliations-rnsr/v1/json.ini deleted file mode 100644 index de8f281..0000000 --- a/affiliations-rnsr/v1/json.ini +++ /dev/null @@ -1,33 +0,0 @@ -# OpenAPI Documentation - JSON format (dot notation) -post.responses.default.description = Return a JSON, composed of `id`, `value`, where value is found `RNSR`(s) -post.responses.default.content.application/json.schema.$ref = #/components/schemas/JSONStream -post.summary = Find RNSR to address given in `value`, when possible -post.requestBody.required = true -post.requestBody.content.application/json.schema.$ref = #/components/schemas/JSONStream -post.requestBody.content.examples.bordeaux.summary = University of Bordeaux address -post.requestBody.content.examples.bordeaux.value.id = 3 -post.requestBody.content.examples.bordeaux.value.value = University of Bordeaux, IMS, CNRS UMR5218, Talence, F-33405, France - -[use] -plugin = basics -plugin = conditor - -[JSONParse] -[replace] -path = id -value = get("id") - -path = authors -value = get("value").toArray("Chaîne").reduce((s,c) => [{affiliations:[{address:s[0].affiliations[0].address+c}]}], [{affiliations:[{address:""}]}]) - -[affAlign] - -[replace] -path = id -value = get("id") - -path = value -value = get("authors.0.affiliations.0.conditorRnsr") - -[JSONString] -indent = env('indent', true)