Skip to content

Instantly share code, notes, and snippets.

View jackflaps's full-sized avatar

Kevin Clair jackflaps

View GitHub Profile
@jackflaps
jackflaps / add.py
Created October 3, 2019 18:08
update metadata in a batch from CSV of URIs using ArchivesSnake
#!/usr/bin/env python
import csv, json, os
from asnake.aspace import ASpace
AS = ASpace()
repo = AS.repositories(2)
def get_json(uri):
@jackflaps
jackflaps / add_from_csv.py
Created September 26, 2019 21:32
draft script for updating archivesspace records from CSV
#!/usr/bin/env python
# this only works on archival_object records for now
import argparse, csv, json, os, re, sys
from asnake.aspace import ASpace
parser = argparse.ArgumentParser(description='Add or update ArchivesSpace metadata properties from CSV input')
parser.add_argument('-d', '--dry-run', help='Show the updates to be made without making them', action='store_true')
parser.add_argument('-f', '--file', help='The CSV file containing the metadata to add')
@jackflaps
jackflaps / technical_debt_analysis.md
Last active January 17, 2019 22:29
current (2018 January 17) thinking on technical debt in metadata management

Forms of Metadata Technical Debt

Code Debt

code debt in the metadata context may include cataloging done outside of the confines of our cataloging rules ... or in violation of established metadata specifications

debt native to the metadata itself -- not enough of it, or metadata insufficient to meet user needs

works cited

@jackflaps
jackflaps / repository_workflows.md
Last active November 27, 2018 00:07
anticipated repository workflows

create object in repository

pre-conditions

  • a digital_object record exists for the digitized or born-digital object in ArchivesSpace
  • the digital_object is linked to, and representative of, an archival_object record with level == "item"
  1. user creates metadata in ArchivesSpace
  2. user logs into backend repository
  3. user initiates ingest from Archivematica SFTP Server using the ingest structure (see ref. in wiki)