Skip to content

Instantly share code, notes, and snippets.

@irv
irv / keybase.md
Created September 23, 2014 20:22

Keybase proof

I hereby claim:

  • I am irv on github.
  • I am andyirving (https://keybase.io/andyirving) on keybase.
  • I have a public key whose fingerprint is 2C59 A75B 1DB9 477A D694 29E0 F0FB 5728 51A3 BA5A

To claim this, I am signing this object:

@irv
irv / av_manifest.json
Last active June 19, 2017 15:07
First forays into generating prezi api 3 manifests for our AV content
{
"context": "http://iiif.io/api/presentation/3/context.json",
"id": "https://api.bl.uk/metadata/iiif/ark:/81055/vdc_100042985903.0x000002/manifest.json",
"type": "Manifest",
"sequences": [
{
"id": "https://api.bl.uk/metadata/iiif/ark:/81055/vdc_100042985903.0x000007",
"type": "Canvas",
"label": "",
"duration": 108.08,
@irv
irv / msbook_mapping.csv
Created December 15, 2017 10:14
Old item viewer uid to ark mapping
We can't make this file beautiful and searchable because it's too large.
lsidyv2adcaf1e,ark:/81055/vdc_000000000012
lsidyv2adcc3e7,ark:/81055/vdc_000000000018
lsidyv2adcda30,ark:/81055/vdc_00000000001E
lsidyv2add0742,ark:/81055/vdc_000000000024
lsidyv2add264b,ark:/81055/vdc_00000000002A
lsidyv2add3c34,ark:/81055/vdc_000000000030
lsidyv2add7420,ark:/81055/vdc_000000000036
lsidyv2add8f8b,ark:/81055/vdc_00000000003C
lsidyv2addb94c,ark:/81055/vdc_000000000042
lsidyv2addf8a8,ark:/81055/vdc_000000000048
@irv
irv / msbook_sysno_mapping
Created December 18, 2017 11:34
Print sysno to ARK mapping
This file has been truncated, but you can view the full file.
ark:/81055/vdc_000000027E58 003996603
ark:/81055/vdc_000000027FEA 000001143
ark:/81055/vdc_000000027E6A 000022782
ark:/81055/vdc_000000028008 000039775
ark:/81055/vdc_00000002802C 000092666
ark:/81055/vdc_000000028002 000093359
ark:/81055/vdc_000000027F12 000150273
ark:/81055/vdc_000000028032 000156011
ark:/81055/vdc_000000027E76 000261714
ark:/81055/vdc_000000027EC4 000445451
@irv
irv / loose-ends.json
Last active June 13, 2018 13:26
Latest prezi 3 with no-nav
{
"@context":["http://www.w3.org/ns/anno.jsonld","http://iiif.io/api/presentation/3/context.json"],
"id":"https://api.bl.uk/metadata/iiif/ark:/81055/vdc_100052359795.0x000002/manifest.json",
"type":"Manifest",
"label":{"en":["C1685/98 Loose ends 17/7/99"]},
"metadata": [
{
"label":{"en":["Title"]},
"value":{"en":["Loose ends 17/7/99"]}
},
{
"@context":["http://www.w3.org/ns/anno.jsonld","http://iiif.io/api/presentation/3/context.json","http://iiif.io/api/auth/1/context.json","http://universalviewer.io/context.json"],
"id":"https://api.bl.uk/metadata/iiif/ark:/81055/vdc_100052359795.0x000002/manifest.json",
"type":"Manifest",
"label":{"en":["C1685/98 Loose ends 17/7/99"]},
"metadata": [
{
"label":{"en":["Full title"]},
"value":{"en":["Loose ends 17/7/99"]}
},
{
"@context":["http://www.w3.org/ns/anno.jsonld","http://iiif.io/api/presentation/3/context.json"],
"id":"https://api.bl.uk/metadata/iiif/ark:/81055/vdc_100055540263.0x000002/manifest.json",
"type":"Manifest",
"label":{"en":["C615/70 C615/71 Tamas Vasary piano"]},
"behavior":["auto-advance"],
"items": [{
"id":"https://api.bl.uk/metadata/iiif/ark:/81055/vdc_100055540263.0x000004",
"type":"Canvas",
"label":{"en":["[No Title]"]},
@irv
irv / transform.py
Created September 19, 2018 14:32
convert gentle word alignment to w3c annotations
import json
def main():
with open("word_aligned.json", "r") as f:
aligned = json.load(f)
transform(aligned["words"])
def transform(words):
enumerated = [{"word":i, "position":x} for x,i in enumerate(words)]
annotations = {"items": list(map(transform_annotation, enumerated))}
@irv
irv / transform.py
Created September 19, 2018 14:33
convert gentle word alignment to w3c annotations
import json
def main():
with open("word_aligned.json", "r") as f:
aligned = json.load(f)
transform(aligned["words"])
def transform(words):
enumerated = [{"word":i, "position":x} for x,i in enumerate(words)]
annotations = {"items": list(map(transform_annotation, enumerated))}
@irv
irv / fulltext_annotations.json
Last active September 19, 2018 14:51
podcast full text from gentle
{
"id":"https://gist.github.com/irv/53018b335e190b63430a481df9e505fa/fulltext_annotations.json",
"items": [
{
"id": "http://example.org/podcast/annotation/0",
"type": "Annotation",
"motivation": "painting",
"body": {
"id": "http://example.org/podcast/annotation/0/word",
"type": "TextualBody",