at SWIB13 in Hamburg (2013-11-25)
Notes for the hands-on steps done by the participants during the workshop.
- Part I: Getting to know CouchDB (13:00-14:00)
- Hello
- me = ssp
- Hello
- earthlingsoft / SUB
# building on 10.7 from Index Data’s git repository | |
# Result: yaz builds with ICU |
Z> find Hilbert | |
Received SRW SearchRetrieve Response | |
Number of hits: 8414 | |
Elapsed: 0.021573 | |
Z> schema dc | |
Z> s 1 | |
Received SRW SearchRetrieve Response | |
Number of hits: 8414 | |
pos=1 schema=dc | |
<record xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:srw_dc="info:srw/schema/1/dc-schema"> |
at SWIB13 in Hamburg (2013-11-25)
Notes for the hands-on steps done by the participants during the workshop.
function(doc) { | |
var process = function (item, keyPath) { | |
if (typeof(item) === 'object' && !isArray(item)) { | |
for (var i in item) { | |
newPath = keyPath.slice(); | |
newPath.push(i); | |
process(item[i], newPath); | |
} | |
} | |
else { |
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
Attempt to use xsl:key on data not stored in the document itself. | |
We _can_ load external XML into a variable using document() and use | |
the key() function on that. | |
We _cannot_ include the XML into our stylesheet and use the key() | |
function on that. |
find /Volumes/Share/Interimsausleihe/Ruecknahme -name "*xls" -print0 | xargs -0 -I FILE excel-extract.py "FILE" | grep -v "^\w*$" > /Volumes/Share/Porst/LBS-CSV/ruecknahme.csv | |
find /Volumes/Share/Interimsausleihe/Ausleihe -name "*xls" -print0 | xargs -0 -I FILE excel-extract.py "FILE" | grep -v "^\w*$" > /Volumes/Share/Porst/LBS-CSV/ausleihe.csv | |
cat /Volumes/Share/Porst/LBS-CSV/ausleihe.csv | csvprintf -s "," '%2$s\n' > /Volumes/Share/Porst/LBS-CSV/ausleihe-barcodes.text | |
cat /Volumes/Share/Porst/LBS-CSV/ruecknahme.csv | csvprintf -s "," '%1$s\n' > /Volumes/Share/Porst/LBS-CSV/ruecknahme-barcodes.text | |
cat /Volumes/Share/Porst/LBS-CSV/*barcodes.text | sort | uniq -d > /Volumes/Share/Porst/LBS-CSV/barcode-duplikate.text |
#!/bin/sh | |
# | |
# für wenige Datensätze: | |
# | |
# als JSON laden | |
cat ppns-hitliste.text | xargs -L 1 -I PPN /Users/ssp/Developer/sru-loader/sru-loader.py --url http://sru.gbv.de/opac-de-7 --schema picaxml --format json --folderdepth 0 --xsl /Users/ssp/SUB/bin/XSLT/Remove-Namespaces.xsl --xsl /Users/ssp/SUB/bin/XSLT/MarcXML2TurboMarc.xsl 'pica.ppn=PPN*' | |
# in CouchDB ablegen | |
find json -print0 | sed -e 's/json\///g' -e 's/\.json//g' | xargs -0 -L 1 -I FILE curl --netrc -X PUT -H "Content-Type: application/json" -d @json/FILE.json http://vlib.sub.uni-goettingen.de/couch/antje-favoriten/FILE | |
/* | |
Based on example script for indexing everything from | |
https://github.com/rnewson/couchdb-lucene | |
*/ | |
function(doc) { | |
var result = new Document(); | |
if (!doc._id.match(/^(_design)/)) { | |
function index(obj, keyPrefix) { | |
for (var key in obj) { | |
var value = obj[key]; |
function(doc, req){ | |
provides('json', function(){ | |
return {'json': doc} | |
}); | |
provides('html', function(){ | |
var listItem = function (key, value) { | |
var result = ''; | |
if (key) { result += '<dt>' + key + '</dt><dd>'; } | |
if (typeof value === 'object') { |
AddCharset iso-8859-1 .html | |
# RedirectMatchs für eDiss | |
# auf Basis der Informationen vom Resolver und Mariannas Handle Liste | |
# | |
# Ziele: | |
# * Redirects für Einstiegsseiten | |
# * Redirects für die dahinter liegenden PDF Dateien | |
# | |
# Probleme: |