eader 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format specdoc
2
+ --color
data/.rvmrc ADDED
@@ -0,0 +1 @@
1
+ rvm use --create 1.9.3@eader
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in eader.gemspec
4
+ gemspec
5
+ gem 'rspec'
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Joe Sak
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # Eader
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'eader'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install eader
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Contributing
24
+
25
+ 1. Fork it
26
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
27
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
28
+ 4. Push to the branch (`git push origin my-new-feature`)
29
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
data/eader.gemspec ADDED
@@ -0,0 +1,21 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'eader/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "eader"
8
+ gem.version = Eader::VERSION
9
+ gem.authors = ["Joe Sak"]
10
+ gem.email = ["joe@joesak.com"]
11
+ gem.description = %q{Parse ead documents}
12
+ gem.summary = %q{Parse ead documents}
13
+ gem.homepage = ""
14
+
15
+ gem.files = `git ls-files`.split($/)
16
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
+ gem.require_paths = ["lib"]
19
+
20
+ gem.add_dependency 'nokogiri'
21
+ end
@@ -0,0 +1,31 @@
1
+ module Eader
2
+ class Document
3
+ attr_reader :path, :file, :doc
4
+
5
+ def initialize(path)
6
+ @path = path
7
+ @file = File.open(path)
8
+ @doc = xml_doc_class.parse(file)
9
+ end
10
+
11
+ def content
12
+ file.rewind
13
+ file.read
14
+ end
15
+
16
+ def items
17
+ dsc_levels.map do |d|
18
+ Item.new(d.css('did'))
19
+ end
20
+ end
21
+
22
+ def dsc_levels
23
+ doc.css('dsc c01')
24
+ end
25
+
26
+ private
27
+ def xml_doc_class
28
+ Nokogiri::XML::Document
29
+ end
30
+ end
31
+ end
data/lib/eader/item.rb ADDED
@@ -0,0 +1,50 @@
1
+ module Eader
2
+ class Item
3
+ attr_accessor :node
4
+
5
+ def initialize(node)
6
+ @node = node
7
+ end
8
+
9
+ def unitid
10
+ if (uid = node.css('unitid')).any?
11
+ uid[0].text.strip
12
+ end
13
+ end
14
+
15
+ def origination
16
+ if (orig = node.css('origination')).any?
17
+ orig[0].text.strip
18
+ end
19
+ end
20
+
21
+ def langmaterial
22
+ if (langm = node.css('langmaterial')).any?
23
+ langm[0].text.strip
24
+ end
25
+ end
26
+
27
+ def unittitle
28
+ if (ut = node.css('unittitle')).any?
29
+ ut[0].text.strip
30
+ end
31
+ end
32
+
33
+ def unitdate
34
+ if _unit_dates.any?
35
+ _unit_dates[0].text.strip
36
+ end
37
+ end
38
+
39
+ def unitdate_type
40
+ if _unit_dates.any?
41
+ _unit_dates[0].attr('type')
42
+ end
43
+ end
44
+
45
+ private
46
+ def _unit_dates
47
+ node.css('unitdate')
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,3 @@
1
+ module Eader
2
+ VERSION = "0.0.1"
3
+ end
data/lib/eader.rb ADDED
@@ -0,0 +1,9 @@
1
+ require "eader/version"
2
+ require "eader/document"
3
+ require "eader/item"
4
+
5
+ require 'nokogiri'
6
+
7
+ module Eader
8
+ # Your code goes here...
9
+ end
@@ -0,0 +1,35 @@
1
+ require "spec_helper"
2
+
3
+ describe Eader do
4
+ let!(:e) { Eader::Document.new('./spec/support/test.xml') }
5
+ let(:item) { e.items.first }
6
+
7
+ it "opens the xml" do
8
+ e.content.should include('<ead>')
9
+ end
10
+
11
+ it "returns dsc levels" do
12
+ e.should have(1).dsc_levels
13
+ end
14
+
15
+ it "returns item unitids" do
16
+ item.unitid.should == 'MR-0002'
17
+ end
18
+
19
+ it "returns item originations" do
20
+ item.origination.should == "N/A"
21
+ end
22
+
23
+ it "returns the langmaterial" do
24
+ item.langmaterial.should == "English"
25
+ end
26
+
27
+ it "returns the unittitle" do
28
+ item.unittitle.should == "5 empty loose CD jewel cases [sound recording]"
29
+ end
30
+
31
+ it "returns the unitdate" do
32
+ item.unitdate.should be_empty
33
+ item.unitdate_type.should == "inclusive"
34
+ end
35
+ end
@@ -0,0 +1,2 @@
1
+ $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2
+ require 'eader'
@@ -0,0 +1,143 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <?xml-stylesheet type="text/xsl" href="/assets/eadcbs2.xsl"?>
3
+ <!DOCTYPE ead PUBLIC "+//ISBN 1-931666-00-8//DTD ead.dtd Encoded Archival Description (EAD) Version 2002//EN" "/assets/ead.dtd">
4
+
5
+ <!--KDM: added namespace info here-->
6
+ <ead>
7
+ <eadheader repositoryencoding="iso15511" id="a0" countryencoding="iso3166-1" langencoding="iso639-2b" audience="internal" dateencoding="iso8601" scriptencoding="iso15924">
8
+ <eadid encodinganalog="856$u" url="" countrycode="US" mainagencycode="US-ICIU"/>
9
+ <filedesc>
10
+ <titlestmt>
11
+ <titleproper encodinganalog="245$a">The Malachi Ritscher Collection</titleproper>
12
+ <subtitle>Live concert recordings (1981 – 2006) and other material</subtitle>
13
+ <author encodinganalog="245$c">Experimental Sound Studio</author>
14
+ </titlestmt>
15
+ <publicationstmt>
16
+ <publisher encodinganalog="260$b">Creative Audio Archive (CAA)/Experimental Sound
17
+ Studio (ESS)</publisher>
18
+ <date type="publication" encodinganalog="260$c">2012</date>
19
+ <address>
20
+ <addressline>5925 N. Ravenswood</addressline>
21
+ <addressline>Chicago, IL 60660</addressline>
22
+ <addressline id="email">info@creativeaudioarchive.org</addressline>
23
+ <addressline id="weblink">www.creativeaudioarchive.org</addressline>
24
+ </address>
25
+ </publicationstmt>
26
+ </filedesc>
27
+ <profiledesc>
28
+ <creation encodinganalog="500">Machine-readable finding aid and skeletal markup derived
29
+ via a macro from Oxygen file; markup checked and completed by Allison Schein. <date normal="20060512">July 7, 2012.</date>
30
+ </creation>
31
+ <langusage>
32
+ <language encodinganalog="546">English</language>
33
+ </langusage>
34
+ </profiledesc>
35
+ </eadheader>
36
+ <archdesc level="collection" type="combined" relatedencoding="MARC21">
37
+ <did id="a1">
38
+ <head>Collection Summary</head>
39
+ <repository label="Repistory:" encodinganalog="852$a">
40
+ <corpname>Experimental Sound Studio</corpname>
41
+ <address>
42
+ <addressline>5925 N. Ravenswood</addressline>
43
+ <addressline>Chicago, IL 60660</addressline>
44
+ </address>
45
+ </repository>
46
+ <origination label="Creator:" encodinganalog="110">
47
+ <corpname>Malachi Ritscher,1954 – 2006 </corpname>
48
+ </origination>
49
+ <unittitle encodinganalog="245" label="Title:">Malachi Ritscher Collection</unittitle>
50
+ <unitdate type="inclusive" label="Dates:" encodinganalog="245$f">1981 - 2006</unitdate>
51
+ <physdesc label="Quantity:" encodinganalog="300$a">
52
+ <extent>4,438 items including DVD's, CD's DATS, cassettes, HI-8 and various other media formats. Approximately 40 linear feet </extent>
53
+ </physdesc>
54
+ <abstract label="Abstract:" encodinganalog="520$a">The Malachi Ritscher Collection represents the work of Chicago sound recordist Malachi Ritscher (1954-2006.)
55
+ The collection contains over 4,000 live recordings, dating from the early 1980s to 2006, mostly recorded in Chicago, and most documenting the work of Chicago musicians.
56
+ </abstract>
57
+ <unitid encodinganalog="099" repositorycode="US-ICIU" label="Identification:" countrycode="US"/>
58
+ <langmaterial encodinganalog="546$a">eng</langmaterial>
59
+ <note label="Note" encodinganalog="500$a">
60
+ <p>Both the finding aid and the collection itself are currently to be considered works in progress.
61
+ Rather than wait until the entire collection is processed before making it generally available to
62
+ researchers--our usual practice--we have decided to make each series available as it is completed.
63
+ </p>
64
+ </note>
65
+ </did>
66
+ <bioghist altrender="biography" encodinganalog="545" id="a2">
67
+ <head>History of the Collection</head>
68
+ <p>Malachi Ritscher, formerly Mark David Ritscher, was born in Dickinson, North Dakota in 1954.
69
+ In 1981 Mr. Ritscher moved to Chicago where he played bass guitar in several musical groups (Want Not, Arsenal and Book of Holy Lies.)
70
+ Mr. Ritscher worked at the University of Chicago as a maintenance engineer for much of his time in Chicago.</p>
71
+ <p>Mr. Ritscher was well known in Chicago not only as a passionate fan of the local music scene but as an accomplished and meticulous documentarian.
72
+ Mr. Ritscher attended thousands of musical performances, many of which he recorded using various handheld recording devices.
73
+ His early cassette recordings from the 1980s capture a wide range of local, national and international artists performing in Chicago venues.
74
+ These cassettes contain otherwise unavailable live recordings of notable artists and groups such as Nirvana, James Brown, Nick Cave and the Bad Seeds, Bauhaus, Ministry,
75
+ the Red Hot Chili Peppers and Laurie Anderson.</p>
76
+ <p>In the late 1980s Mr. Ritscher began making high fidelity recordings of performances using a handheld Digital Audio Tape recorder (DAT).
77
+ While Mr. Ritscher continued to document performances of well-known artists, the vast majority of these later recordings were of concerts in the idiom of creative and
78
+ improvised music with particular attention paid to local artists such as Ken Vandermark, Josh Abrams, Jeff Parker, Hamid Drake, Dave Rempis and Michael Zerang.
79
+ These recordings often featured collaborations between Chicago artists and visiting European musicians.
80
+ Mr. Ritscher recorded these performances at various local venues including the Velvet Lounge and the Empty Bottle.</p>
81
+ <p>After his death in 2006, Mr. Ritscher willed his collection of recordings to longtime friend Bruno Johnson to administer and disperse.
82
+ In 2004 Mr. Johnson contacted the Experimental Sound Studios and later donated the collection to the repositories’ Creative Audio Archives for research and preservation. </p>
83
+ </bioghist>
84
+ <scopecontent encodinganalog="520" id="a3">
85
+ <head>Scope and Contents</head>
86
+ <p>The Malachi Ritscher Collection (1981-2006) contains over 4,000 sound recordings and 438 unique ephemeral pieces.
87
+ The recordings of concerts, primarily in the idioms of creative jazz and improvised music dating from the early 1980s to 2006,
88
+ mostly recorded in Chicago, document the work of Chicago musicians. This includes numerous recordings of Chicago musicians collaborating
89
+ with important European improvisers, such as Peter Brötzmann, Derek Bailey, Ab Baars, Mats Gustafsson, and others, as well as many concerts
90
+ by members of the Association for the Advancement of Creative Musicians, such as Roscoe Mitchell, Hamid Drake, Fred Anderson, Harrison Bankhead, and others.
91
+ There are also rare recordings of singular events, such as the 1981 Women’s Jazz Festival in Kansas City, and complete recordings of the Empty Bottle Jazz Festivals from 1999-2004.
92
+ The collection also contains some of the recording and playback equipment Mr. Ritscher used to make his recordings as well as recording logs, set lists and fliers from performances
93
+ he recorded and recordings of musical groups he played in.</p>
94
+ </scopecontent>
95
+ <arrangement encodinganalog="351">
96
+ <head>Arrangement of the Collection</head>
97
+ <p>The Malachi Ritscher Collections is arranged in 5 series.
98
+
99
+ Series 1, Live Recordings, 1982-2006, contains the live recordings that comprise the bulk of the collection. Series1 is arranged chronologically. Whenever possible, date and venue information has been included in the item level description as well as a note with transcriptions of Mr. Ritscher’s handwritten labels. A supplemental index has been created to allow users to search the collection using the artist’s name.
100
+
101
+ Series 2, Documentation, 1997-2005, is made up of Mr. Ritscher’s personal documentation. Items include Mr. Ritscher’s recording notes, notebooks and logs and correspondence. Series 2 is arranged chronologically.
102
+
103
+ Series 3, Ephemera, 1982-1987, contains all of the ephemeral materials in the collection. These include ticket stubs, programs fliers and set lists from concerts.
104
+ Series 3 is arranged chronologically.
105
+
106
+ Series 4, Creative Works, 1981-1989, contains Mr. Ritscher’s musical works. Series 4 is arranged chronologically.
107
+
108
+ Series 5, Equipment, consists of recording and playback equipment as well as media storage devices such as hard drives and floppy discs. Series 5 is arranged alphabetically.
109
+ </p>
110
+ </arrangement>
111
+ <accessrestrict encodinganalog="506" id="a14">
112
+ <head>Restrictions on Access</head>
113
+ <p>Material is available to interested researchers by appointment.</p>
114
+ </accessrestrict>
115
+ <userestrict encodinganalog="540" id="a15">
116
+ <head>Restrictions on Use</head>
117
+ <p>All material is copyright restricted to the individual artists that appear in the
118
+ recordings.</p>
119
+ </userestrict>
120
+ <!--KDM: there were stray </p></note></c01> tags here-->
121
+ <acqinfo encodinganalog="541">
122
+ <head>Acquisition Information</head>
123
+ <p>The bulk of the collection was acquired by ESS on DVD's, CD's cassettes and DAT's.</p>
124
+ </acqinfo>
125
+ <processinfo encodinganalog="583">
126
+ <head>Processing Information</head>
127
+ <p>Sonia Yoon managed the organization of the collection and supervised the cataloging. Allison Schein conducted the
128
+ limited transfer audio to digital files. Allison Schein and Patrick Seymour
129
+ identified each recording by artist, date, location, duration, track listing and number. Craig Klein created Biographical Information and History of the Collection and the Scope and Contents of the Collection. Special thanks to Karen Miller for all her assistance in creating this document.
130
+ </p>
131
+ </processinfo>
132
+ <dsc>
133
+ <c01 level="item">
134
+ <did>
135
+ <unitid countrycode="iso3166-1" repositorycode="iso15511"> MR-0002 </unitid>
136
+ <origination> N/A </origination>
137
+ <langmaterial>English</langmaterial>
138
+ <unittitle> 5 empty loose CD jewel cases [sound recording]</unittitle>
139
+ <unitdate type="inclusive"> </unitdate>
140
+ </did>
141
+ </c01>
142
+ </dsc>
143
+ </ead>
metadata ADDED
@@ -0,0 +1,79 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: eader
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Joe Sak
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-01-17 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: nokogiri
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ description: Parse ead documents
31
+ email:
32
+ - joe@joesak.com
33
+ executables: []
34
+ extensions: []
35
+ extra_rdoc_files: []
36
+ files:
37
+ - .gitignore
38
+ - .rspec
39
+ - .rvmrc
40
+ - Gemfile
41
+ - LICENSE.txt
42
+ - README.md
43
+ - Rakefile
44
+ - eader.gemspec
45
+ - lib/eader.rb
46
+ - lib/eader/document.rb
47
+ - lib/eader/item.rb
48
+ - lib/eader/version.rb
49
+ - spec/eader_spec.rb
50
+ - spec/spec_helper.rb
51
+ - spec/support/test.xml
52
+ homepage: ''
53
+ licenses: []
54
+ post_install_message:
55
+ rdoc_options: []
56
+ require_paths:
57
+ - lib
58
+ required_ruby_version: !ruby/object:Gem::Requirement
59
+ none: false
60
+ requirements:
61
+ - - ! '>='
62
+ - !ruby/object:Gem::Version
63
+ version: '0'
64
+ required_rubygems_version: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ requirements: []
71
+ rubyforge_project:
72
+ rubygems_version: 1.8.24
73
+ signing_key:
74
+ specification_version: 3
75
+ summary: Parse ead documents
76
+ test_files:
77
+ - spec/eader_spec.rb
78
+ - spec/spec_helper.rb
79
+ - spec/support/test.xml