public
Created

JSON for OpenRefine to transform a CV in APA style into columns and query SHERPA/RoMEO for publisher rights. See this blog post for full details: http://www.gloriousgeneralist.com/2013/02/analyzing-cvs-for-publisher-copyrights-and-self-archiving-with-openrefine/

  • Download Gist
cvomatic
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150
[
{
"op": "core/column-split",
"description": "Split column Column 1 by separator",
"engineConfig": {
"facets": [],
"mode": "row-based"
},
"columnName": "Column 1",
"guessCellType": true,
"removeOriginalColumn": true,
"mode": "separator",
"separator": " (",
"regex": false,
"maxColumns": 2
},
{
"op": "core/column-split",
"description": "Split column Column 1 2 by separator",
"engineConfig": {
"facets": [],
"mode": "row-based"
},
"columnName": "Column 1 2",
"guessCellType": true,
"removeOriginalColumn": true,
"mode": "separator",
"separator": "). ",
"regex": false,
"maxColumns": 2
},
{
"op": "core/column-split",
"description": "Split column Column 1 2 2 by separator",
"engineConfig": {
"facets": [],
"mode": "row-based"
},
"columnName": "Column 1 2 2",
"guessCellType": true,
"removeOriginalColumn": true,
"mode": "separator",
"separator": ". ",
"regex": false,
"maxColumns": 2
},
{
"op": "core/column-split",
"description": "Split column Column 1 2 2 2 by separator",
"engineConfig": {
"facets": [],
"mode": "row-based"
},
"columnName": "Column 1 2 2 2",
"guessCellType": true,
"removeOriginalColumn": true,
"mode": "separator",
"separator": ", ",
"regex": false,
"maxColumns": 2
},
{
"op": "core/column-rename",
"description": "Rename column Column 1 2 1 to Date",
"oldColumnName": "Column 1 2 1",
"newColumnName": "Date"
},
{
"op": "core/column-rename",
"description": "Rename column Column 1 1 to Author",
"oldColumnName": "Column 1 1",
"newColumnName": "Author"
},
{
"op": "core/column-rename",
"description": "Rename column Column 1 2 2 1 to Article",
"oldColumnName": "Column 1 2 2 1",
"newColumnName": "Article"
},
{
"op": "core/column-rename",
"description": "Rename column Column 1 2 2 2 1 to Journal",
"oldColumnName": "Column 1 2 2 2 1",
"newColumnName": "Journal"
},
{
"op": "core/column-rename",
"description": "Rename column Column 1 2 2 2 2 to Bib",
"oldColumnName": "Column 1 2 2 2 2",
"newColumnName": "Bib"
},
{
"op": "core/column-addition-by-fetching-urls",
"description": "Create column SHERPA at index 4 by fetching URLs based on column Journal using expression grel:'http://www.sherpa.ac.uk/romeo/api29.php?ak=[YOUR API KEY HERE]&qtype=starts&jtitle=' + escape(value,'url')",
"engineConfig": {
"facets": [],
"mode": "row-based"
},
"newColumnName": "SHERPA",
"columnInsertIndex": 4,
"baseColumnName": "Journal",
"urlExpression": "grel:'http://www.sherpa.ac.uk/romeo/api29.php?ak=[YOUR API KEY HERE]&qtype=starts&jtitle=' + escape(value,'url')",
"onError": "set-to-blank",
"delay": 1000
},
{
"op": "core/column-addition",
"description": "Create column Prearchiving at index 5 based on column SHERPA using expression grel:value.parseHtml().select(\"prearchiving\")[0].htmlText()",
"engineConfig": {
"facets": [],
"mode": "row-based"
},
"newColumnName": "Prearchiving",
"columnInsertIndex": 5,
"baseColumnName": "SHERPA",
"expression": "grel:value.parseHtml().select(\"prearchiving\")[0].htmlText()",
"onError": "set-to-blank"
},
{
"op": "core/column-addition",
"description": "Create column Postarchiving at index 5 based on column SHERPA using expression grel:value.parseHtml().select(\"postarchiving\")[0].htmlText()",
"engineConfig": {
"facets": [],
"mode": "row-based"
},
"newColumnName": "Postarchiving",
"columnInsertIndex": 5,
"baseColumnName": "SHERPA",
"expression": "grel:value.parseHtml().select(\"postarchiving\")[0].htmlText()",
"onError": "set-to-blank"
},
{
"op": "core/column-addition",
"description": "Create column Conditions at index 5 based on column SHERPA using expression grel:forEach(value.parseHtml().select(\"condition\"),v,v.htmlText()).join(\". \")\"",
"engineConfig": {
"facets": [],
"mode": "row-based"
},
"newColumnName": "Conditions",
"columnInsertIndex": 5,
"baseColumnName": "SHERPA",
"expression": "grel:forEach(value.parseHtml().select(\"condition\"),v,v.htmlText()).join(\". \")\"",
"onError": "set-to-blank"
},
{
"op": "core/column-removal",
"description": "Remove column SHERPA",
"columnName": "SHERPA"
}
]

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.