Skip to content

Instantly share code, notes, and snippets.

View markpbaggett's full-sized avatar

Mark Baggett markpbaggett

View GitHub Profile
@markpbaggett
markpbaggett / example.html
Created March 8, 2024 18:59
Example MP4 with captions and audio descriptions
<video controls src="/media/cc0-videos/friday.mp4">
<track kind="captions" src="sampleCaptions.vtt" srclang="en" />
<track kind="descriptions" src="sampleDescriptions.vtt" srclang="en" />
<track kind="chapters" src="sampleChapters.vtt" srclang="en" />
<track kind="subtitles" src="sampleSubtitles_de.vtt" srclang="de" />
<track kind="subtitles" src="sampleSubtitles_en.vtt" srclang="en" />
<track kind="subtitles" src="sampleSubtitles_ja.vtt" srclang="ja" />
<track kind="subtitles" src="sampleSubtitles_oz.vtt" srclang="oz" />
</video>
@markpbaggett
markpbaggett / saxon.sh
Created March 7, 2024 19:21
My Saxon Helper
#!/bin/bash
# Check if correct number of arguments are provided
if [ "$#" -ne 3 ]; then
echo "Usage: $0 input_xml output_hocr type"
exit 1
fi
input_xml="$1"
output_hocr="$2"
@markpbaggett
markpbaggett / report.md
Last active March 4, 2024 14:09
Report for Feb 26 - March 1

Weekly Report - February 26 - March 1, 2024

Tasks / Worked On

  • Import of new digital collection UT Magazine
    • Actually, this isn't true. Something happened during ingest that made porter.lib.utk.edu:8080 become unavailable. Thus, only some works got in. To fix, I have to either: 1. review what went in and make sure it all got ther or 2. purge everything and start over.
  • Migrations
    • Migrated Colloquy
    • Migrated Arrowmont Arrow
  • Migrated WWIIOH
@markpbaggett
markpbaggett / alto.xml
Created February 27, 2024 19:35
Test Alto
<?xml version="1.0" encoding="UTF-8"?><alto xmlns="http://www.loc.gov/standards/alto/ns-v2#" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/standards/alto/ns-v2# http://www.loc.gov/standards/alto/v2/alto-2-0.xsd">
<Description>
<MeasurementUnit>pixel</MeasurementUnit>
<sourceImageInformation>
<fileName>\\FileShare02\d\Digitized Microfilm\University of Tennessee 20220331\Orchestrator\In\batch_Beacon_01\LH1.T2U8\39029022779668\1968010501\1968010501_00001.tif</fileName>
</sourceImageInformation>
<OCRProcessing ID="OCR_0">
<ocrProcessingStep>
<processingSoftware>
<softwareName>tesseract 5.1.0</softwareName>
{
"@context": "http://iiif.io/api/presentation/3/context.json",
"id": "https://cdm17217.contentdm.oclc.org/iiif/maps:1538/manifest.json",
"type": "Manifest",
"metadata": [
{
"label": {
"none": [
"Item Creator"
]
@markpbaggett
markpbaggett / upgrade.js
Last active February 28, 2024 00:06
Upgrade a IIIF Presentation Manifest from 2 to 3
const fs = require('fs');
const { fetch } = require('@iiif/helpers');
async function main() {
try {
const [,, manifestUrl, outputFile] = process.argv;
if (!manifestUrl || !outputFile) {
console.error('Usage: node script.js <manifestUrl> <outputFile>');
return;
@markpbaggett
markpbaggett / report_2-23-24.md
Last active February 26, 2024 13:08
Report for Feb 23, 24

Weekly Report - February 18 - 23 2024

Tasks / Worked On

  • Short week.
    • Out Thursday
    • Out Friday
  • "Fixed" Python Services on Oriole
    • The original systemd services were written incorrectly so that when restarts of the vm happened, the services were not working correctly.
  • Added After and Requires settings to wait on Apache and Networking to come up.
@markpbaggett
markpbaggett / manifest.json
Last active February 16, 2024 13:31
Temp Monroe County History Collection
{
"@context": "http://iiif.io/api/presentation/3/context.json",
"id": "https://gist.githubusercontent.com/markpbaggett/a6919ff5d41ead237f4867c40b8a7970/raw/2556761a665d8214581e3500e07910fd82eb6e10/manifest.json",
"type": "Collection",
"label": {
"en": [
"Monroe County Historical Documents"
]
},
"items": [

Weekly Report - February 12 - 16 2024

Tasks / Worked On

  • RFTA Artists bug is fixed.
    • Fixed OAI logic bug.
    • Notified Ex Libris that I had worked out problem.
    • Need to add tests so that this doesn't happen again going forward.
  • Tested Workflows so that we can finally resume migration.
  • Long story short, if Ldp:HttpError, Rebuild. If not, follow standard process.
@markpbaggett
markpbaggett / report.md
Last active February 10, 2024 00:42
Weekly Report - February 5 - 9 2024