diff --git a/affiliations-tools/v1/rnsr/conditor.ini b/affiliations-tools/v1/rnsr/conditor.ini new file mode 100644 index 0000000..b7621c8 --- /dev/null +++ b/affiliations-tools/v1/rnsr/conditor.ini @@ -0,0 +1,17 @@ +# OpenAPI Documentation - JSON format (dot notation) +post.responses.default.description = Return a Conditor JSON notice, added with `conditorRnsr` field +post.responses.default.content.application/json.schema.$ref = #/components/schemas/JSONStream +post.summary = Find RNSR to address given in `authors.affiliations`, when possible +post.requestBody.required = true +post.requestBody.content.application/json.schema.$ref = #/components/schemas/JSONStream + +[use] +plugin = basics +plugin = conditor + +[JSONParse] + +[affAlign] + +[JSONString] +indent = env('indent', true) diff --git a/affiliations-tools/v1/rnsr/csv.ini b/affiliations-tools/v1/rnsr/csv.ini new file mode 100644 index 0000000..53ec2db --- /dev/null +++ b/affiliations-tools/v1/rnsr/csv.ini @@ -0,0 +1,33 @@ +# OpenAPI Documentation - JSON format (dot notation) +post.responses.default.description = Return a CSV, composed of `Année`, `Adresse`, and enriched with a `RNSR` field. +post.responses.default.content.application/json.schema.$ref = #/components/schemas/anyValue +post.summary = Adds RNSR to addresses field, when possible +post.requestBody.required = true +post.requestBody.content.application/json.schema.$ref = #/components/schemas/anyValue + +[use] +plugin = basics +plugin = conditor + +[CSVParse] +[CSVObject] +[replace] +path = xPublicationDate +value = get("Année").toArray().reduce((array, char) => ([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-tools/v1/rnsr/json.ini b/affiliations-tools/v1/rnsr/json.ini new file mode 100644 index 0000000..de8f281 --- /dev/null +++ b/affiliations-tools/v1/rnsr/json.ini @@ -0,0 +1,33 @@ +# 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)