Skip to content

Instantly share code, notes, and snippets.

View Digital-Grinnell's full-sized avatar

Digital Grinnell Digital-Grinnell

View GitHub Profile
@Digital-Grinnell
Digital-Grinnell / pre-commit
Created January 21, 2023 01:39
My pre-commit Git Hook
# Contents of ~/gitconfig/hooks/pre-commit
# Replace `last_modified_at` timestamp with current time in the specified TZ for .md edits only
# Note that this file should exist on your workstation as `~/gitconfig/hooks/pre-commit` and the file must be executable!
git diff --cached --name-status | egrep -i "^(A|M).*\.(md)$" | while read a b; do
cat $b | sed "/---.*/,/---.*/s/^last_modified_at:.*$/last_modified_at: $(TZ=CST6CDT date "+%Y-%m-%dT%H:%M:%S")/" > tmp
mv tmp $b
git add $b
done
@Digital-Grinnell
Digital-Grinnell / gist:a9e16626c4e98af3aa88e2446031f374
Last active November 8, 2022 19:51
Digital-Grinnell-MODS-MASTER-Twig-Rev-22
<?xml version="1.0" encoding="UTF-8"?>
{# Digital_Grinnell_MODS_Master.twig Revision 22
THE official copy of this Twig template can be found as a Gist at
https://gist.github.com/Digital-Grinnell/a9e16626c4e98af3aa88e2446031f374
This TWIG template for IMI import is intended to serve as a general-purpose
starting point for MODS import into Digital Grinnell.
@Digital-Grinnell
Digital-Grinnell / DEV_HISTORY.md
Last active March 29, 2022 19:01
Copy of DEV_HISTORY.md from Digital-Grinnell/OHScribe

OHScribe! Development History

Move to Reclaim Cloud

In March 2022 a move was made to migrate the OHScribe! application to a new host, Reclaim Cloud (RC). A few changes were required to get the code working properly in RC's version of a wsgi production environment. Intended functionality remains unchanged, as does most of the layout, theme, and behavior.

Necessary Changes for Reclaim Cloud

Reclaim Cloud employs a Jelastic interface for PaaS configuration. There's helpful documentation in one of Jelastic's blog posts, Python Cloud Hosting with Jelastic Paas, but it lacks anything specific to Flask or the Web Server Gateway Interface (WSGI) production server that RC provides.

@Digital-Grinnell
Digital-Grinnell / WORKFLOW.md
Created March 29, 2022 18:34
Copy of WORKFLOW.md from Digital-Grinnell/OHScribe

InqScribe IOH Transcription Workflow

Grinnell College employs the transcription workflow described here when preparing oral histories for ingest into Digital Grinnell. This workflow includes a commercially available software tool called InqScribe and at Grinnell transcribers also frequently use a VEC USB Footpedal to help control playback of audio to be transcribed.

Training Video

An 11.5 minute long is available to reinforce the concepts presented below.

training video

@Digital-Grinnell
Digital-Grinnell / README.md
Created March 29, 2022 18:31
Copy of README.md from Digital-Grinnell/OHScribe

Digital.Grinnell features a fair number of transcribed digital oral histories. Most are interviews conducted with Grinnelleans as they return to campus annually for alumni Reunion or Grinnell's Multicultural Reunion.

What follows is largely sharable "public" content lifted from a "private" GitHub repository at https://github.com/McFateM/OHScribe, the README.md and WORKFLOW.md files in particular.

OHScribe!

https://ohscribe.us.reclaim.cloud/ Note: This link is the new production home for OHScribe! as of March 2022. It is now hosted on Reclaim Cloud. The old address, https://ohscribe.grinnell.edu, is no longer in service.

This is a Python 3 and Flask web application designed to transform oral history transcripts, presumably created using InqScribe, into XML suitable for ingest into the **[Isla

@Digital-Grinnell
Digital-Grinnell / gist:707c5c30b2a046e638b1e645a796838d
Last active September 16, 2021 13:27
Azure Aliases from Static.Grinnell.edu
| Site's Azure Address | .grinnell.edu Alias |
| --- | --- |
| https://victorious-field-065e3d110.azurestaticapps.net | vaf.grinnell.edu |
| https://green-beach-045641410.azurestaticapps.net | vaf-kiosk.grinnell.edu |
| https://ashy-hill-086e62810.azurestaticapps.net | dlad-blog.grinnell.edu |
| https://victorious-river-0bf860d10.azurestaticapps.net | static.grinnell.edu |
| https://icy-tree-020380010.azurestaticapps.net | rootstalk-DEV.grinnell.edu |
| https://black-sea-0a2020810.azurestaticapps.net | cb-DEV.grinnell.edu |
@Digital-Grinnell
Digital-Grinnell / gist:fb9774c807ac4f9005edec9ca2869e9e
Last active April 20, 2021 16:51
Digital-Grinnell-Profile-MADS-Twig Rev 1
{# Digital_Grinnell_Profiles_MADS.twig Revision 1
THE official copy of this Twig template can be found as a Gist at
https://gist.github.com/Digital-Grinnell/436cd922a5c855635b931d05cf8a242a
This TWIG template for IMI import is intended to serve as a general-purpose
starting point for MADS Profile import into Digital Grinnell.
History --------------------
Rev 1
Creating from scratch. Very simple template strictly for use with data supplied by Liz on 2021-04-20.
#}
{% block content %}
@Digital-Grinnell
Digital-Grinnell / gist:436cd922a5c855635b931d05cf8a242a
Last active April 20, 2021 16:29
Digital-Grinnell-Organizations-and-Profiles-MADS-Twig-Template Rev 2
{# Digital_Grinnell_Organization_MADS.twig Revision 2
THE official copy of this Twig template can be found as a Gist at
https://gist.github.com/Digital-Grinnell/436cd922a5c855635b931d05cf8a242a
This TWIG template for IMI import is intended to serve as a general-purpose
starting point for MADS Organization import into Digital Grinnell.
History --------------------
Rev 2
Corrected XML statement and made related_names conditional.
Rev 1
Creating from scratch. Very simple template strictly for use with data supplied by Liz on 2021-04-19.
@Digital-Grinnell
Digital-Grinnell / gist:c437b4b697b4fa50e842842cf1e5232b
Created March 5, 2021 18:29
Output from `iduF --help` captured on 5-March-2021
[islandora@dgdocker1 ~]$ docker exec -it isle-apache-dg bash
root@7b1ab68705d0:/# cd /var/www/html/sites/default/
root@7b1ab68705d0:/var/www/html/sites/default# drush -u 1 iduF --help
Attempts to apply the specified 'Fix' to one or more existing PIDs.
Examples:
Example drush iduF grinnell:10000 ChangeText --dsid=MODS --xpath="/mods/relatedItem/identifier[@type='uri']"
Arguments:
first First PID to process. The namespace (ns) portion of this PID defines the default primary namespace. This parameter may be
@Digital-Grinnell
Digital-Grinnell / README.md
Last active November 4, 2020 02:32
README.md from //Storage/LIBRARY/mcfatem/DG-FEDORA-Master

Note: This file is maintained as a public gist to simplify sharing. It can be found at https://gist.github.com/Digital-Grinnell/f0900e9af9341e67433633be3fa0895d.

DG-FEDORA is the name of a USB stick/volume that I designed long ago to be a "portable" FEDORA repository intended for use with a local ISLE stack. It holds a pre-configured and populated sample of FEDORA digital objects gleaned from Digital.Grinnell. Using DG-FEDORA you could easily add a pre-populated repository of objects to your "demo" or "local" environment ISLE project in as little as 5 minutes.

The canonical USB stick was renamed DG-MASTER on 28-Oct-2020 and it now includes utility scripts for many purposes. One script, clone-to-X.sh has been used to create numerous copies of DG-MASTER for distribution to multiple devices and colleagues. Each copy is given a UNIQUE name to identify its owner or purpose. For example, I have a personal copy named DG-MARK1. The DG- prefix is REQUIRED,