Skip to content

Instantly share code, notes, and snippets.

@symac

symac/CheckDOI.json

Created Mar 1, 2019
Embed
What would you like to do?
[
{
"op": "core/column-addition-by-fetching-urls",
"description": "Create column DOI_resolver at index 1 by fetching URLs based on column DOI using expression grel:\"https://doi.org/api/handles/\" + value + \"?type=URL\"",
"engineConfig": {
"facets": [],
"mode": "row-based"
},
"newColumnName": "DOI_resolver",
"columnInsertIndex": 1,
"baseColumnName": "DOI",
"urlExpression": "grel:\"https://doi.org/api/handles/\" + value + \"?type=URL\"",
"onError": "store-error",
"delay": 50,
"cacheResponses": true,
"httpHeadersJson": [
{
"name": "authorization",
"value": ""
},
{
"name": "user-agent",
"value": "OpenRefine 3.1 [b90e413]"
},
{
"name": "accept",
"value": "*/*"
}
]
},
{
"op": "core/text-transform",
"description": "Text transform on cells in column DOI_resolver using expression grel:value.parseJson()[\"values\"][0][\"data\"][\"value\"]",
"engineConfig": {
"facets": [],
"mode": "row-based"
},
"columnName": "DOI_resolver",
"expression": "grel:value.parseJson()[\"values\"][0][\"data\"][\"value\"]",
"onError": "store-error",
"repeat": false,
"repeatCount": 10
},
{
"op": "core/column-addition-by-fetching-urls",
"description": "Create column API_CrossRef at index 1 by fetching URLs based on column DOI using expression grel:\"https://api.crossref.org/works/\" + value",
"engineConfig": {
"facets": [],
"mode": "row-based"
},
"newColumnName": "API_CrossRef",
"columnInsertIndex": 1,
"baseColumnName": "DOI",
"urlExpression": "grel:\"https://api.crossref.org/works/\" + value",
"onError": "store-error",
"delay": 50,
"cacheResponses": true,
"httpHeadersJson": [
{
"name": "authorization",
"value": ""
},
{
"name": "user-agent",
"value": "OpenRefine 3.1 [b90e413]"
},
{
"name": "accept",
"value": "*/*"
}
]
},
{
"op": "core/text-transform",
"description": "Text transform on cells in column API_CrossRef using expression grel:value.parseJson()[\"message\"][\"title\"][0]",
"engineConfig": {
"facets": [],
"mode": "row-based"
},
"columnName": "API_CrossRef",
"expression": "grel:value.parseJson()[\"message\"][\"title\"][0]",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.