diff --git a/mapping-tools/v1/inspire-category/meta-category/regroupement-inspire-categories.ini b/mapping-tools/v1/inspire-category/meta-category/regroupement-inspire-categories.ini index f8d9526..2d402ae 100644 --- a/mapping-tools/v1/inspire-category/meta-category/regroupement-inspire-categories.ini +++ b/mapping-tools/v1/inspire-category/meta-category/regroupement-inspire-categories.ini @@ -1,4 +1,4 @@ -# Lit le fichier CSV, et renvoie du JSON [{id, value}] +# Lit le fichier TSV, et renvoie du JSON [{id, value}] [use] plugin = basics plugin = analytics diff --git a/mapping-tools/v1/inspire-labos/in2p3-labos/json.ini b/mapping-tools/v1/inspire-labos/in2p3-labos/json.ini new file mode 100644 index 0000000..3b65a13 --- /dev/null +++ b/mapping-tools/v1/inspire-labos/in2p3-labos/json.ini @@ -0,0 +1,41 @@ +# OpenAPI Documentation - JSON format (dot notation) +mimeType = application/json + +post.operationId = post-v1-inspire-labos-in2p3-labos-json +post.requestBody.content.application/json.example.0.id = 0 +post.requestBody.content.application/json.example.0.value = 903453 +post.requestBody.content.application/json.schema.$ref = #/components/schemas/IdChaines +post.requestBody.required = true +post.responses.default.content.application/json.example.0.id = 0 +post.responses.default.content.application/json.example.0.value = GANIL +post.responses.default.content.application/json.schema.$ref = #/components/schemas/IdChaines +post.description = Renvoie le nom du laboratoire IN2P3 correspondant au code labo Inspire_Hep envoyé. +post.responses.default.description = Renvoie un JSON, composé d `id`, `value`, avec `value` étant le nom du laboratoire IN2P3. +post.tags.0: mapping +post.summary: Trouve un labo IN2P3 associé à un code labo Inspire_Hep +post.parameters.0.description = Indenter le JSON résultant +post.parameters.0.in = query +post.parameters.0.name = indent +post.parameters.0.required = false +post.parameters.0.schema.type = boolean + +[use] +plugin = basics +plugin = analytics + +[JSONParse] + +# Homogenize ID: url, string and number to an url +[combine] +path = value +default = n/a +primer = ./regroupement-inspire-labos.tsv +file = ./regroupement-inspire-labos.ini +persistent = true + +[assign] +path = value +value = get("value.value") + +[JSONString] +indent = env('indent', true) diff --git a/mapping-tools/v1/inspire-labos/in2p3-labos/regroupement-inspire-labos.ini b/mapping-tools/v1/inspire-labos/in2p3-labos/regroupement-inspire-labos.ini new file mode 100644 index 0000000..2d402ae --- /dev/null +++ b/mapping-tools/v1/inspire-labos/in2p3-labos/regroupement-inspire-labos.ini @@ -0,0 +1,15 @@ +# Lit le fichier TSV, et renvoie du JSON [{id, value}] +[use] +plugin = basics +plugin = analytics + +[files] +[CSVParse] +separator = fix("\t") +[CSVObject] +[replace] +path = id +value = get("FROM") + +path = value +value = get("TO") diff --git a/mapping-tools/v1/inspire-labos/in2p3-labos/regroupement-inspire-labos.tsv b/mapping-tools/v1/inspire-labos/in2p3-labos/regroupement-inspire-labos.tsv new file mode 100644 index 0000000..a911bad --- /dev/null +++ b/mapping-tools/v1/inspire-labos/in2p3-labos/regroupement-inspire-labos.tsv @@ -0,0 +1,29 @@ +FROM TO +910133 APC Paris +907607 CC-IN2P3 +902989 CPPM +903453 GANIL +1608212 IJClab +903100 IJClab +907588 IJClab +903099 IJClab +1776405 IJClab +903118 IN2P3 dir +911249 IP2I Lyon +902974 IP2I Lyon +1743848 IP2I Lyon +911366 IPHC +1776404 L2IT +903421 LAPP +902786 LLR +1188219 LNCA +904493 LP2I Bordeaux +2020952 LP2I Bordeaux +902703 LPC Caen +902740 LPC Clermont +903119 LPNHE +907247 LPSC +902828 LPSC +1201986 LUPM +1347082 OMEGA +906885 SUBATECH