diff --git a/mapping-tools/examples.http b/mapping-tools/examples.http index 264e996..cd59c19 100644 --- a/mapping-tools/examples.http +++ b/mapping-tools/examples.http @@ -13,12 +13,19 @@ # Trouver l'idRef associƩ au halAuthorId (format LODEX) POST https://mapping-tools.services.inist.fr/v1/halAuthorId/idRef/json?indent=true HTTP/1.1 +#POST http://localhost:31976/v1/halAuthorId/idRef/json?indent=true HTTP/1.1 Content-Type: application/json [ { "id":1, "value": "https://data.archives-ouvertes.fr/author/1458607" }, { "id":2, "value": "https://data.archives-ouvertes.fr/author/1358616" }, - { "id":3, "value": "https://data.archives-ouvertes.fr/author/11165563" } + { "id":3, "value": "https://data.archives-ouvertes.fr/author/11165563" }, + { "id":4, "value": "1458607" }, + { "id":5, "value": "1358616" }, + { "id":6, "value": "11165563" }, + { "id":7, "value": 1458607 }, + { "id":8, "value": 1358616 }, + { "id":9, "value": 11165563 } ] ### diff --git a/mapping-tools/v1/halAuthorId/idRef/json.ini b/mapping-tools/v1/halAuthorId/idRef/json.ini index 2207a67..8f27c95 100644 --- a/mapping-tools/v1/halAuthorId/idRef/json.ini +++ b/mapping-tools/v1/halAuthorId/idRef/json.ini @@ -19,6 +19,12 @@ plugin = analytics [JSONParse] + +# Homogenize ID: url, string and number to an url +[assign] +path = value +value = get("value").split('/').last().replace(/^[^\d]*(?=[\d])/,"https://data.archives-ouvertes.fr/author/") + [combine] path = value default = n/a