Skip to content

Instantly share code, notes, and snippets.

View br2490's full-sized avatar

Benjamin Rosner br2490

View GitHub Profile
@br2490
br2490 / upd_compound_inclusion_relationship_to_book.php
Created October 17, 2017 12:59
Update Islandora Compound Objects Relationships
// Requires devel (doesn't need to be enabled).
// Head to https://<host.domain.tld>/devel/php to EXECUTE THIS LIVE.
// Just want to see the data this will spit out? Comment out lines
// starting with "$res" and "$res2" which are the only calls making actual modification.
$pid = 'BC15-14:852'; // This is your compound object's PID.
$compound = islandora_compound_object_get_parts($pid);
if (empty($compound)) {
// Not Compound.
@br2490
br2490 / Dorothy Oak Scrapbook - BC15-20_0.xml
Last active October 11, 2017 23:59
RELS-EXT relationships in BC15.20
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:fedora="info:fedora/fedora-system:def/relations-external#" xmlns:fedora-model="info:fedora/fedora-system:def/model#" xmlns:islandora="http://islandora.ca/ontology/relsext#">
<rdf:Description rdf:about="info:fedora/BC15-20:0">
<fedora-model:hasModel rdf:resource="info:fedora/islandora:collectionCModel"></fedora-model:hasModel>
<fedora:isMemberOf rdf:resource="info:fedora/BC15:0"></fedora:isMemberOf>
<islandora:hasLanguage rdf:resource="info:fedora/eng"></islandora:hasLanguage>
</rdf:Description>
</rdf:RDF>
Building mods from CSV MD file for: BC15-12_diary19031908 [ok]
Creating diary (book) object for: BC15-12_diary19031908 [ok]
[ok]
<mods xmlns="http://www.loc.gov/mods/v3" xmlns:mods="http://www.loc.gov/mods/v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink"
xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/mods/v3/mods-3-5.xsd">
<identifier type="local">BC15-12_diary19031908</identifier>
<titleInfo>
chromium-browser --kiosk [url] --no-first-run --touch-events=enabled --fast --fast-start --disable-popup-blocking --disable-infobars --disable-session-crashed-bubble --disable-tab-switcher --disable-translate --enable-low-res-tiling
welcometext="<div style="margin: auto; text-align:center;"><img alt='Embedded Image' src='' /></div>
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
import requests
import time
fgs_url = 'http://islandora:8080/fedoragsearch/rest'
user = 'fedoraAdmin'
password = 'XXXXX'
fgs_session = requests.Session()
fgs_session.auth = (user, password)
@br2490
br2490 / RSUB
Created August 11, 2016 12:56
Download RMATE, rename, chmod and all that jazz
#!/bin/bash
echo "Configuring RSUB."
sudo wget -vO /usr/local/bin/rsub https://raw.github.com/aurora/rmate/master/rmate
sudo chmod a+x /usr/local/bin/rsub
@br2490
br2490 / risearch.csv
Created July 28, 2016 17:31
Manuscript Module Import Query
pid title
info:fedora/bcrw:1001 Memo from Catharine Stimpson to Baxter, Elliott, Gould, Graham, and Hertz, regarding priorities for the Women's Center, June 30, 1971
info:fedora/bcrw:1004 Letter from Bernice Sandler to Martha Peterson, October 18, 1971
info:fedora/bcrw:1006 Letter from Martha Peterson to Bernice Sandler, October 25, 1971
info:fedora/bcrw:1008 Letter from Martha Peterson to Catharine Stimpson, November 30, 1971
info:fedora/bcrw:101 Letter from Mary Scotti to Elly Elliott, October 18, 1971
info:fedora/bcrw:1011 Memo from Jane Gould to Catharine Stimpson, regarding two suggested projects for the Women's Center, December 6, 1971
info:fedora/bcrw:1013 Letter from Catharine Stimpson to Martha Peterson, December 7, 1971
info:fedora/bcrw:1016 Memo from Catharine Stimpson to Martha Peterson, regarding library exhibits, December 15, 1971
info:fedora/bcrw:1018 Memo from Catharine Stimpson to the Women's Center's Executive Committee, regarding "January Fun," December 28, 1971
@br2490
br2490 / Copy attempt 1.png
Last active July 15, 2016 15:56
Collection Copy Edit, version 1
Copy attempt 1.png