Skip to content

Instantly share code, notes, and snippets.

View thisismattmiller's full-sized avatar
😑
...

Matt Miller thisismattmiller

😑
...
View GitHub Profile
<marc:record>
<marc:leader>01044cam a2200313 i 4500</marc:leader>
<marc:controlfield tag="001">NYPG003001905-B</marc:controlfield>
<marc:controlfield tag="003">CStRLIN</marc:controlfield>
<marc:controlfield tag="005">20010822094422.6</marc:controlfield>
<marc:controlfield tag="008">850325s1974 le 000 p|arax </marc:controlfield>
<marc:datafield ind1=" " ind2=" " tag="010">
<marc:subfield code="a">74233784</marc:subfield>
</marc:datafield>
<marc:datafield ind1=" " ind2=" " tag="035">
@thisismattmiller
thisismattmiller / no_call_number.xml
Last active June 8, 2016 08:21
No call number middleware conversion
<?xml version="1.0" ?>
<bibRecords>
<bibRecord>
<bib>
<owningInstitutionId>NYPL</owningInstitutionId>
<content>
<collection xmlns="http://www.loc.gov/MARC21/slim">
<record>
<leader>01370nas a2200325K 4500</leader>
<controlfield tag="008">020417u1uuuuuuuscuuu u000 a0eng d</controlfield>
@thisismattmiller
thisismattmiller / sierra_export_example.xml
Created June 14, 2016 15:02
Example MARC record exported from Sierra for the ReCAP Shared Collection Project
<?xml version="1.0" encoding="UTF-8" ?>
<marc:collection xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd">
<marc:record>
<marc:leader>01370nas a2200325K 4500</marc:leader>
<marc:controlfield tag="003">CStRLIN</marc:controlfield>
<marc:controlfield tag="005">20000925124433.0</marc:controlfield>
<marc:controlfield tag="008">800701| gauu| ||| 0 |eng|n</marc:controlfield>
<marc:datafield ind1=" " ind2=" " tag="035">
<marc:subfield code="a">NN804496037</marc:subfield>
</marc:datafield>
@thisismattmiller
thisismattmiller / .block
Created July 26, 2016 16:11 — forked from mbostock/.block
Focus+Context via Brushing
license: gpl-3.0
license: gpl-3.0
@thisismattmiller
thisismattmiller / example_HTC1_b100186026.xml
Created August 3, 2016 15:24
Example of b100186026 from HTC1 file
<collection xmlns="http://www.loc.gov/MARC21/slim">
<record>
<leader>21320cas a2203841 a 4500</leader>
<controlfield tag="001">NYPG026-S</controlfield>
<controlfield tag="005">20000925124546.4</controlfield>
<controlfield tag="008">810602c18749999iluwr1p 0 a1eng a</controlfield>
<datafield ind1=" " ind2=" " tag="010">
<subfield code="z">78000099sn</subfield>
</datafield>
<datafield ind1="0" ind2=" " tag="022">
@thisismattmiller
thisismattmiller / example_HTC6_b12055267x_1.xml
Created August 3, 2016 15:29
Example of b12055267x from HTC6 file
<collection xmlns="http://www.loc.gov/MARC21/slim">
<record>
<leader>02614nas a2200481I 4500</leader>
<controlfield tag="001">32472712</controlfield>
<controlfield tag="003">OCoLC</controlfield>
<controlfield tag="005">19950515101659.0</controlfield>
<controlfield tag="008">950515d18981906maumr p 0 a1eng d</controlfield>
<datafield ind1=" " ind2=" " tag="040">
<subfield code="a">NYP</subfield>
<subfield code="c">NYP</subfield>
@thisismattmiller
thisismattmiller / example_HTC3_b108337716_1.xml
Created August 3, 2016 15:40
Example of b108337716 from HTC3 file
<collection xmlns="http://www.loc.gov/MARC21/slim">
<record>
<leader>02024cas a2200481 4500</leader>
<controlfield tag="001">NYPG83-S7204</controlfield>
<controlfield tag="003">CStRLIN</controlfield>
<controlfield tag="005">20000925124435.8</controlfield>
<controlfield tag="007">hdrafb|||buca</controlfield>
<controlfield tag="007">hdrbfb|||baaa</controlfield>
<controlfield tag="007">hdradb|||buca</controlfield>
<controlfield tag="007">herbmu|||bucu</controlfield>
@thisismattmiller
thisismattmiller / convert-2-scsb-module.json
Created October 10, 2016 22:51
Example of convert-2-scsb-module record
{
"bNumber": ".b100030671",
"bibCallNumber": [
"*OFA 82-2981"
],
"controlFields": [
{
"001": "NYPG003000521-B"
},
{
var searchResults = require('./search.json')
var collapse = (results) => {
var owiLookup = {}
if (!results || !results.searchResults || !results.searchResults.itemListElement) return results
// make the lookup by owi
results.searchResults.itemListElement.forEach((r) => {
if (r.result && r.result.idOwi && r.result.idOwi[0]) {
if (!owiLookup[r.result.idOwi[0]]) owiLookup[r.result.idOwi[0]] = []
owiLookup[r.result.idOwi[0]].push(r)
import json
import csv
"""
I ran this SPARQL query on linkedjazz.org/sparql
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT * WHERE {
?subject foaf:name ?object
}