Skip to content

Instantly share code, notes, and snippets.

View saracarl's full-sized avatar

Sara Brumfield saracarl

View GitHub Profile
{
"@context":"http://iiif.io/api/presentation/3/context.json",
"requiredStatement":{
"label":{
"en":[
"Rights Note"
]
},
"value":{
"en":[
@saracarl
saracarl / index.js
Created December 10, 2020 18:26
Convert a csv of Google Map coordinates (EPSG:900913 Google Maps Global Mercator) to Lat/Long (EPSG:4326 WGS 84)
// build a command line node program following https://developer.okta.com/blog/2019/06/18/command-line-app-with-nodejs
// npm install proj4
// npm install read-excel-file
// expect the input file to be columns: name, X, Y
// run & output to a useful CSV: node . > output.csv
#!/usr/bin/env node
const readXlsxFile = require('read-excel-file/node');
const proj4 = require("proj4");
Crayfish/Milliner/cfg/config.example.yaml:drupal_base_url: http://localhost:8000
Crayfish/Milliner/cfg/config.example.yaml:gemini_base_url: http://localhost:8000/gemini
x Crayfish/Houdini/var/cache/dev/srcApp_Islandora_Houdini_KernelDevDebugContainer.xml: <argument>http://localhost:8000/gemini</argument>
x 2 changes x Crayfish/Houdini/vendor/islandora/crayfish-commons/DependencyInjection/Configuration.php: ->scalarNode('gemini_base_uri')->cannotBeEmpty()->defaultValue('http://localhost:8000/gemini')->end()
Crayfish/Houdini/vendor/symfony/http-foundation/Tests/RequestTest.php: $request->headers->set('host', 'trusted.com:8000');
Crayfish/Recast/cfg/config.example.yaml:gemini_base_url: http://localhost:8000/gemini
Crayfish/Recast/cfg/config.example.yaml:drupal_base_url: http://localhost:8000
Binary file drupal/web/core/modules/workspaces/tests/fixtures/update/drupal-8.6.0-workspaces_installed.php matches
Binary file drupal/web/modules/contrib/permissions_by_term/tests/src/Behat/fixtures/d
{
"@type": "oa:Annotation",
"@context": "http://iiif.io/api/presentation/2/context.json",
"@id": "8bfa51d3-65de-458e-8370-f69d4f8348e3", //this should be a URI to the annotation
// for the next section
// "on" should become on array (it is in Mirador)
// each element of that array (you currently have only one) will need a "purpose"
// purpose for annotation on text is "commenting"
// purpose for annotation on the image is "painting" (we don't have that one yet, it's OK)
"on": { //I think instead of "on" it should be "target" but Ben disagrees. "on" matches Mirador.
@saracarl
saracarl / fragment-unification
Created December 8, 2018 20:59
Steps used to combine 2 National Archive of Norway Manuscript Fragments
View the manifest:
https://betaiiif.arkivverket.no/manifest.json
and pull the 2 images we want to combine out of it:
https://betaiiif.arkivverket.no/iiif/2/6fbac983-20d0-4eda-bb2d-197c08db3147/full/full/0/default.jpg
https://betaiiif.arkivverket.no/iiif/2/3b19494b-b65d-4f73-ba73-260d40ec3ca0/full/full/0/default.jpg
Crop the images using UCD's crop tool to get just the manuscript part of the images:
https://betaiiif.arkivverket.no/iiif/2/6fbac983-20d0-4eda-bb2d-197c08db3147//159,146,1223,1668/full/0/default.jpg
https://betaiiif.arkivverket.no/iiif/2/3b19494b-b65d-4f73-ba73-260d40ec3ca0/109,119,1309,1644/full/0/default.jpg
@saracarl
saracarl / manifest.json
Last active December 8, 2018 13:38
National Archives of Norway Fragment Unification
{
"@context": [
"http://www.w3.org/ns/anno.jsonld",
"http://iiif.io/api/presentation//context.json"
],
"id": "https://example.org/iiif/book1/manifest",
"type": "Manifest",
"label": { "en": [ "Image 1" ] },
"items": [
{
{
"@context": "http://iiif.io/api/presentation/2/context.json",
"@id": "http://011e7ee3-6d1f-4375-baf9-75eca28ceac2",
"@type": "sc:Manifest",
"label": "Norrøne fragmenter",
"metadata": [],
"description": [
{
"@value": "Diverse norrøne fragmenter",
"@language": "no"
{ "@context":"http://iiif.io/api/presentation/2/context.json", "@id":"representation:2/manifest", "@type":"sc:Manifest", "label":"", "metadata":[ ], "license":"", "logo":"", "related":[ ], "seeAlso":[ ], "service":[ ], "sequences":[ { "@id":"representation:2/sequence/s0", "@type":"sc:Sequence", "label":"Sequence s0", "rendering":[ ], "viewingHint":"paged", "canvases":[ { "@id":"representation:2:1", "@type":"sc:Canvas", "label":"1", "thumbnail":null, "seeAlso":[ ], "height":624, "width":538, "images":[ { "@id":"http://archives.seattle.gov/digital-collections/media/collectiveaccess/images/0/33914_ca_object_representations_media_2_large.jpg", "@type":"oa:Annotation", "motivation":"sc:painting", "resource":{ "@id":"/digital-collections/service.php/IIIF/representation:2:1/full/!512,512/0/default.jpg", "@type":"dctypes:Image", "format":"image/jpeg", "height":624, "width":538, "service":{ "@context":"http://iiif.io/api/image/2/context.json", "@id":"http://archives.seattle.gov/digital-collections/media/collectiveacce
{
"@context": "http://iiif.io/api/presentation/2/context.json",
"@id": "https://dms-data.stanford.edu/data/manifests/Parker/bc854fy5899/manifest.json",
"@type": "sc:Manifest",
"label": "Cambridge, Corpus Christi College, MS 296: John Wyclif and his followers, Tracts in Middle English",
"description": "CCCC MS 296 contains a late fourteenth-century (after 1383) collection of Lollard tracts and sermons written in Middle English. The entire collection was once ascribed to John Wyclif (d. 1384) but is now believed to be the work of a number of authors. All the tracts in this volume have been published by either F. D. Matthew in 1880 and 1902 (repr.1998) or Thomas Arnold in 1871.",
"attribution": "© the Master and Fellows of Corpus Christi College, Cambridge. Licensed under a Creative Commons Attribution-NonCommercial 4.0 International License. For higher resolution images suitable for scholarly or commercial publication, either in print or in an electronic format, please contact the Parker Library directly
{
"@context": "http://iiif.io/api/presentation/2/context.json",
"@id": "https://iiif.bodleian.ox.ac.uk/iiif/manifest/baa0439f-9641-445b-9a60-582640662f2e.json",
"@type": "sc:Manifest",
"label": "Sara's Map",
"metadata": [
{
"label": "Digital.Bodleian",
"value": "<span>View at: <a href=\"https://digital.bodleian.ox.ac.uk/inquire/p/baa0439f-9641-445b-9a60-582640662f2e\">Digital.Bodleian</a></span>"
},