Skip to content

Instantly share code, notes, and snippets.

View finoradin's full-sized avatar

Cass Fino-Radin (they/them) finoradin

View GitHub Profile
@finoradin
finoradin / digitalfile.xml
Created November 6, 2015 12:12
Process history metadata example by Peggy Griesinger for MoMA NDSR project
<?xml version="1.0" encoding="UTF-8"?>
<mets xmlns="http://www.loc.gov/METS/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:premis="info:lc/xmlns/premis-v2"
xmlns:pbcore="http://www.pbcore.org/PBCore/PBCoreNamespace.html"
xmlns:revtmd="http://nwtssite.nwts.nara/schema/"
xsi:schemaLocation="http://www.loc.gov/METS/ http://www.loc.gov/standards/mets/mets.xsd http://purl.org/dc/terms/
http://dublincore.org/schemas/xmls/qdc/2008/02/11/dcterms.xsd info:lc/xmlns/premis-v2
http://www.loc.gov/standards/premis/v2/premis-v2-2.xsd http://www.pbcore.org/PBCore/PBCoreNamespace.html
http://pbcore.org/xsd/pbcore-2.0.xsd http://nwtssite.nwts.nara/schema/
This file has been truncated, but you can view the full file.
<?xml version="1.0" encoding="UTF-8"?>
<MediaTrace
xmlns="http://www.mediaarea.net/mediatrace"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.mediaarea.net/mediatrace http://www.mediaarea.net/mediatrace/mediatrace.xsd"
version="0.7.76"
ref="/Users/bfino/Downloads/right.mov">
<block offset="0" name="File Type" size="20">
<block offset="0" name="Header" size="8">
<data offset="0" name="Size">20</data>
<?xml version="1.0" encoding="UTF-8"?>
<MediaTrace
xmlns="http://www.mediaarea.net/mediatrace"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.mediaarea.net/mediatrace http://www.mediaarea.net/mediatrace/mediatrace.xsd"
version="0.7.76"
ref="/Users/bfino/Downloads/mengbo right test2.mov">
<block offset="0" name="File Type" size="32">
<block offset="0" name="Header" size="8">
<data offset="0" name="Size">32</data>
@finoradin
finoradin / 60s.csv
Created July 31, 2015 18:36
csv of artworks from MoMA dataset collected in 60s
We can't make this file beautiful and searchable because it's too large.
Title,Artist,ArtistBio,Date,Medium,Dimensions,CreditLine,MoMANumber,Classification,Department,DateAcquired,CuratorApproved,ObjectID,URL
"Concert Hall Project, Dresden, Germany (Interior perspective of preliminary scheme)",Hans Poelzig,"(German, 1869–1936)",1918,Color pencil and graphite on tracing paper,"14 5/8 x 16 1/8"" (37.1 x 41 cm)",Gift of Henry G. Proskauer,1087.2009,A&D Architectural Drawing,Architecture & Design,1966-01-11,Y,76,http://www.moma.org/collection/works/76
"Palais de la Découverte Project, Paris, France, Elevation","Paul Nelson, Frantz Jourdain, Oscar Nitzchke","(American, 1895–1979) (French, 1847–1935) (American, born Germany. 1900–1991)",1938,Ink and color pencil on paper mounted on board,"14 3/4 x 37 1/2 x 1/2"" (37.5 x 95.3 x 1.3 cm)",Gift of the architects,98.2013,A&D Architectural Drawing,Architecture & Design,1966-01-01,Y,151,http://www.moma.org/collection/works/151
"Palais de la Découverte Project, Paris, France, Longitudinal section","Paul Nelson, Frantz Jourdain, Oscar Nitzchke",
General
Complete name : /Volumes/JODI_00Archi/mydesktop---JODI.00013/4_artwork/OSX1047b.mov_small.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom
File size : 251 MiB
Duration : 12mn 44s
Overall bit rate : 2 753 Kbps
Encoded date : UTC 1904-01-01 00:00:00
Tagged date : UTC 1904-01-01 00:00:00
General
Complete name : /Volumes/JODI_00Archi/mydesktop---JODI.00013/4_artwork/OSX1047b.mov
Format : MPEG-4
Format profile : QuickTime
Codec ID : qt
File size : 847 MiB
Duration : 10mn 59s
Overall bit rate : 10.8 Mbps
Encoded date : UTC 2009-05-11 18:26:56
Tagged date : UTC 2009-05-11 18:28:07
00000000 -------------------------
00000000 --- DPX, accepted ---
00000000 -------------------------
00000000 Generic section header (1664 bytes)
00000000 File information (768 bytes)
00000000 Magic number: SDPX
00000004 Offset to image data: 8192 (0x00002000)
00000008 Version number of header format: V1.0
00000010 Total image file size: 12754944 (0x00C2A000)
00000014 Ditto Key: 1 (0x00000001)
@finoradin
finoradin / gist:a597a15115de93fd8230
Created December 12, 2014 09:00
media_processing.conf
# ----------------------------------------------------------------------------------------------------------------
# Processing for object representations
# ----------------------------------------------------------------------------------------------------------------
#
# If you want original media fetched from URLs to *NOT* be stored in CA, but rather
# for CA to directly reference the media via the URL used to fetch it set use_external_url_when_available to 1
#
# If you have no idea what this means then leave this set to zero
#
# ----------------------------------------------------------------------------------------------------------------
# Processing for object representations
# ----------------------------------------------------------------------------------------------------------------
#
# If you want original media fetched from URLs to *NOT* be stored in CA, but rather
# for CA to directly reference the media via the URL used to fetch it set use_external_url_when_available to 1
#
# If you have no idea what this means then leave this set to zero
#
@finoradin
finoradin / xfr_csv_fix.py
Created August 13, 2013 23:27
A pretty jenky way of finding the date in an XML blob and putting it in the correct column.
import csv, re, argparse, os
parser = argparse.ArgumentParser(description="Helper for fixing xfr stn metadata. yolo.")
parser.add_argument('-i', '--input', type=str, required=True, help='full path to csv')
args = parser.parse_args()
csv_file = os.path.normpath(args.input)
with open(csv_file, 'rb') as xfrstncsv:
reader = csv.reader(xfrstncsv, delimiter=',', quotechar='"')