Skip to content

Instantly share code, notes, and snippets.

View ross-spencer's full-sized avatar
💭
🖖

Ross Spencer ross-spencer

💭
🖖
View GitHub Profile
@ross-spencer
ross-spencer / 2020-02-06-tdr-checklist.md
Last active July 14, 2021 09:38
TDR checklist in Markdown

AUDIT AND CERTIFICATION OF TRUSTWORTHY DIGITAL REPOSITORIES RECOMMENDED PRACTICE

CCSDS 652.0-M-1

MAGENTA BOOK (Extract)

September 2011

Trusted Digital Repository Checklist

3 ORGANIZATIONAL INFRASTRUCTURE

@ross-spencer
ross-spencer / fpr-queries.sql
Created November 29, 2019 12:18
Queries used for the FPR
This file has been truncated, but you can view the full file.
####################################################################################################
####################################################################################################
####################################################################################################
FPR table queries
Date: 2019-11-14
AM: 1.10.1
####################################################################################################
####################################################################################################
@ross-spencer
ross-spencer / serve.go
Created November 27, 2019 14:59
Test Archivematica callbacks
// Basic server capability to test storage service callbacks.
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
"strings"
)
@ross-spencer
ross-spencer / default-fpr.json
Created November 4, 2019 16:16
Default FPR Archivematica 1.10
This file has been truncated, but you can view the full file.
[
{
"fields": {
"description": "Audio Interchange File Format",
"group": "c94ce0e6-c275-4c09-b802-695a18b7bf2a",
"slug": "audio-interchange-file-format",
"uuid": "22147b00-0fdc-4653-aa7b-618d1f4b6ffb"
},
"model": "fpr.format",
"pk": 1
@ross-spencer
ross-spencer / mets.xml
Created September 25, 2019 09:38
metsrw lossy demo
<?xml version='1.0' encoding='UTF-8'?>
<mets:mets xmlns:mets="http://www.loc.gov/METS/" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/METS/ http://www.loc.gov/standards/mets/version111/mets.xsd">
<mets:metsHdr CREATEDATE="2019-09-25T08:55:30" LASTMODDATE="2019-09-25T09:37:22"/>
<mets:dmdSec ID="dmdSec_1">
<mets:mdWrap MDTYPE="PREMIS:OBJECT">
<mets:xmlData>
<premis:object xmlns:premis="http://www.loc.gov/premis/v3" xsi:type="premis:intellectualEntity" xsi:schemaLocation="http://www.loc.gov/premis/v3 http://www.loc.gov/standards/premis/v3/premis.xsd" version="3.0">
<premis:objectIdentifier>
<premis:objectIdentifierType>UUID</premis:objectIdentifierType>
<premis:objectIdentifierValue>2586f749-e675-4d43-b48b-7cc8fd20fa92</premis:objectIdentifierValue>
@ross-spencer
ross-spencer / test-compression.sh
Created September 22, 2019 23:16
Archivematica compression test bash script
#!/bin/bash
set -u
# Archivematica compresses uses three tools, at five compression levels. It
# does not use LZMA2 but including it here to understand how much faster it is
# than LZMA.
#
# * 7z bzip2
# * 7z lzma
@ross-spencer
ross-spencer / todo.sh
Last active May 1, 2019 15:20
Simple TODO list implementation inspired by http://todotxt.org/
#!/bin/bash
# Bash script for a rudimentary TODO list.
#
# For best results, save in /usr/local/bin and create a symlink to todo:
#
# $ sudo mv todo.sh /usr/local/bin/
# $ sudo ln -s /usr/local/bin/todo.sh /usr/local/bin/todo
#
# Inspired by the very cool: http://todotxt.org/ specification.
@ross-spencer
ross-spencer / examples.md
Last active April 11, 2019 09:08
Bagit layouts and DC metadata in Archivematica

Bagit layouts and DC metadata

Turns out it's not straightforward and very much depends on how your bag is configured.

Layout one

Highlights

  • Metadata not part of the bag, dropped inside the top-level.
  • Path needs to start data/....
@ross-spencer
ross-spencer / duplicates.sh
Created April 3, 2019 18:37
Create 'n' duplicates of a single file
#!/bin/bash
# Simple bash script to make many copies of one file.
#
# ARG $1: Filename
# ARG $2: Number of copies
#
set -eux
@ross-spencer
ross-spencer / api-demo
Created March 7, 2019 20:43
Archivematica API demo
# Demo Commands for UDenver
----------------------------------------------------------
Version 1.0: 2018-09-21 Initial commands for UDenver Demo
Version 2.0: 2018-11-07 Added Unapproved Transfers Example
----------------------------------------------------------
# 1. Start Transfer
-------------------
http --pretty=format \