Skip to content

Instantly share code, notes, and snippets.

View milothiesen's full-sized avatar
💓

Milo Thiesen milothiesen

💓
View GitHub Profile
@milothiesen
milothiesen / netx_iiif_manifest.json
Last active December 30, 2020 16:58
netx_iiif_manifest.json
{
"logo": "https://www.metmuseum.org/-/media/images/exhibitions/2020/gifts-in-celebration-of-the-anniversary/new-png/met150_webassets_mediumrotation_landingpage_480x480.png",
"description": "",
"label": "DP157297",
"sequences": [
{
"canvases": [
{
"height": 7210,
"images": [
@milothiesen
milothiesen / gist:ea6d849776a92e3a7cc67745f76d5cbc
Created December 30, 2020 16:50
met_iiif_annotation_list_test.json
{
"@context": "http://iiif.io/api/presentation/2/context.json",
"@id": "met_iiif_annotation_list_test.json",
"@type": "sc:AnnotationList",
"resources": [
{
"@type": "oa:Annotation",
"motivation": "sc:painting",
"resource": {
"@type": "cnt:ContentAsText",
import bagit
import os
import asyncio
root_path = "/Users/thiesm/Desktop/test_bags/"
class BulkValidate:
#this method prints all paths and checksums and validates the bag
def verify_bag(self, bag):
@milothiesen
milothiesen / NetX_Wrappify.js
Created November 17, 2018 00:59
NetX Wrappify - The Met
manifest.json
{
"manifest_version": 2,
"name": "NetX - wrappify",
"description": "This extension will remove truncation from all fields in curator view",
"version": "0.0.0.1",
"author": "Milo Thiesen - Lead Technical Analyst - Metropolitan Museum of Art",
"background": {
"scripts": ["jquery-3.3.1.min.js","background.js"]
},
import pprint
arr = [{
"codec": "MPEG",
"wrapper": "mov",
"commerical": "Pro Res"
},
{
"codec": "MPEG-4",
"wrapper": "mp4",
@milothiesen
milothiesen / video_analyzer.py
Created January 5, 2018 14:00
A Python script that searches recursively through a given directory and pulls technical metadata about the video codec and wrapper
import os
import sys
import subprocess
import lxml.etree as ET
import pprint
rootdir = sys.argv[1]
accepted_file_types = ['mov', 'mp4', 'm4v', 'wmv']
files_list = []
formats_list = []
{
"@context": "http://iiif.io/api/presentation/2/context.json",
"@id": "http://fe6f2d2c-56ea-4428-8a5e-0baf9205f36f",
"@type": "sc:Manifest",
"label": "[Click to edit label]",
"metadata": [],
"sequences": [
{
"@id": "http://97d1aef1-cb91-4913-9ab4-ff1a32ec54f5",
"@type": "sc:Sequence",
### need to copy to DEST without overwriting and add a -1 if its the first one and -2 if its the second....is my script right? check with multiple files for one stop.
### need to write to a new csv that contains metadata for the headers listed below
import os
import os.path
import sys
import shutil
import csv
import subprocess
ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'
@milothiesen
milothiesen / WikiMediaFileNamer.py
Created January 31, 2017 21:57
Open a csv, add a new column, concatenate information from various rows, insert desired concat into last cell in row
#!/usr/bin/python
import csv
import sys
filename = sys.argv[1]
# destination = sys.argv[2]
titles = []
met = " MET "