mead 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. data/Gemfile +5 -4
  2. data/README.rdoc +19 -7
  3. data/VERSION +1 -1
  4. data/bin/automead +8 -1
  5. data/mead.gemspec +5 -5
  6. metadata +27 -27
data/Gemfile CHANGED
@@ -3,19 +3,20 @@ source "http://rubygems.org"
3
3
  # Example:
4
4
  # gem "activesupport", ">= 2.3.5"
5
5
 
6
- gem "rmagick", ">= 0"
6
+
7
7
  gem "nokogiri", "= 1.4.3.1"
8
8
  gem "json", ">= 0"
9
9
  gem "trollop", ">= 0"
10
10
 
11
11
  gem "fastercsv", ">= 0", :platforms => :ruby_18
12
12
 
13
- gem "gbarcode", ">= 0.98.20", :platforms => :ruby_18
14
-
15
-
16
13
  # Add dependencies to develop your gem here.
17
14
  # Include everything needed to run rake, tests, features, etc.
18
15
  group :development do
16
+ # only used for barcoding
17
+ gem "gbarcode", ">= 0.98.20", :platforms => :ruby_18
18
+ gem "rmagick", ">= 0"
19
+
19
20
  gem "shoulda", ">= 0"
20
21
  gem "bundler", "~> 1.0.0"
21
22
  gem "jeweler", "~> 1.5.1"
data/README.rdoc CHANGED
@@ -12,17 +12,28 @@ the archival description makes the physical collections.
12
12
  == Functionality
13
13
 
14
14
  - Parse EAD XML and output all identifiers (with other metadata) for all the
15
- component parts. This export can be CSV or JSON.
16
- - Resolve a filename-identifier to a location in the physical collection and
17
- extract related metadata up through the hierarchy
15
+ component parts. This export can be CSV or JSON.
16
+ - Resolve a filename-identifier to a location in the physical collection and
17
+ extract related metadata up through the hierarchy
18
18
  - Create barcodes based on an identifiers.
19
19
  - Validate whether an identifier is well-formed and valid by resolving to a
20
- component part in the EAD XML.
20
+ component part in the EAD XML.
21
21
  - Commandline tools for each of these functions.
22
22
 
23
23
  == Installation
24
24
 
25
- - clone from github and build the gem from source at this time
25
+ gem install mead
26
+
27
+ To enable barcode generation you'll need to install rmagick and the version of
28
+ gbarcode specified in the Gemfile.
29
+
30
+ == Commandline use
31
+
32
+ automead --help
33
+
34
+ automead --mead mc00240-001-ff0052-000-001 --baseurl http://www.lib.ncsu.edu/findingaids --ruby
35
+
36
+ ead2meads --url http://www.lib.ncsu.edu/findingaids/mc00240.xml
26
37
 
27
38
  == Identifier specification in brief
28
39
 
@@ -31,7 +42,7 @@ collection are located. To make this work for as wide a range of encoded EAD XML
31
42
  and archival arrangement and processing practice as we could, it includes many
32
43
  pieces of information to help insure uniqueness within a collection.
33
44
 
34
- Indentifiers are made up of 6 possible segments. Segments are separated by a
45
+ Identifiers are made up of 6 possible segments. Segments are separated by a
35
46
  single dash - to aid in readability. Take the sample identifier
36
47
  mc00240-001-ff0001-000-001_0001
37
48
 
@@ -72,8 +83,9 @@ mc00240-001-ff0001-000-001_0001
72
83
 
73
84
  == TODO
74
85
 
86
+ - Refactor, refactor, refactor.
75
87
  - Test for use by other institutions. I'm happy to help make this code work for
76
- the needs of other institutions.
88
+ the needs of other institutions.
77
89
  - Get more examples for more tests.
78
90
  - Better exceptions.
79
91
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.5
1
+ 0.0.6
data/bin/automead CHANGED
@@ -19,14 +19,21 @@ Default output is pretty printed Ruby. Multiple outputs can be specified.
19
19
 
20
20
  where options are:
21
21
  EOS
22
- opt :mead, "A mead-style identifier", :required => true, :type => String
22
+ opt :mead, "A mead-style identifier", :type => String
23
23
  opt :baseurl, 'Specify just the base URL for grabbing the EAD XML if it is of the format baseurl/eadid.xml.', :type => String
24
24
  opt :url, 'Specify the whole URL for grabbing the EAD XML.', :type => String
25
25
  opt :file, 'File path to EAD XML.', :type => String
26
26
  opt :ruby, 'Output as pretty printed Ruby. Default.'
27
27
  opt :json, 'Output as JSON'
28
+ opt :ver, 'Output just the version number of the gem.'
28
29
  end
29
30
 
31
+ if opts[:ver]
32
+ puts File.read(File.join(File.dirname(__FILE__), '..', 'VERSION'))
33
+ exit
34
+ end
35
+
36
+ Trollop::die 'You must include a mead identifier.' if !opts[:mead] and !opts[:ver]
30
37
  check_options(opts)
31
38
  location = get_location(opts)
32
39
 
data/mead.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{mead}
8
- s.version = "0.0.5"
8
+ s.version = "0.0.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jason Ronallo"]
@@ -92,12 +92,12 @@ Gem::Specification.new do |s|
92
92
  s.specification_version = 3
93
93
 
94
94
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
95
- s.add_runtime_dependency(%q<rmagick>, [">= 0"])
96
95
  s.add_runtime_dependency(%q<nokogiri>, ["= 1.4.3.1"])
97
96
  s.add_runtime_dependency(%q<json>, [">= 0"])
98
97
  s.add_runtime_dependency(%q<trollop>, [">= 0"])
99
98
  s.add_runtime_dependency(%q<fastercsv>, [">= 0"])
100
- s.add_runtime_dependency(%q<gbarcode>, [">= 0.98.20"])
99
+ s.add_development_dependency(%q<gbarcode>, [">= 0.98.20"])
100
+ s.add_development_dependency(%q<rmagick>, [">= 0"])
101
101
  s.add_development_dependency(%q<shoulda>, [">= 0"])
102
102
  s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
103
103
  s.add_development_dependency(%q<jeweler>, ["~> 1.5.1"])
@@ -107,12 +107,12 @@ Gem::Specification.new do |s|
107
107
  s.add_development_dependency(%q<fakeweb>, [">= 0"])
108
108
  s.add_development_dependency(%q<ruby-debug>, [">= 0"])
109
109
  else
110
- s.add_dependency(%q<rmagick>, [">= 0"])
111
110
  s.add_dependency(%q<nokogiri>, ["= 1.4.3.1"])
112
111
  s.add_dependency(%q<json>, [">= 0"])
113
112
  s.add_dependency(%q<trollop>, [">= 0"])
114
113
  s.add_dependency(%q<fastercsv>, [">= 0"])
115
114
  s.add_dependency(%q<gbarcode>, [">= 0.98.20"])
115
+ s.add_dependency(%q<rmagick>, [">= 0"])
116
116
  s.add_dependency(%q<shoulda>, [">= 0"])
117
117
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
118
118
  s.add_dependency(%q<jeweler>, ["~> 1.5.1"])
@@ -123,12 +123,12 @@ Gem::Specification.new do |s|
123
123
  s.add_dependency(%q<ruby-debug>, [">= 0"])
124
124
  end
125
125
  else
126
- s.add_dependency(%q<rmagick>, [">= 0"])
127
126
  s.add_dependency(%q<nokogiri>, ["= 1.4.3.1"])
128
127
  s.add_dependency(%q<json>, [">= 0"])
129
128
  s.add_dependency(%q<trollop>, [">= 0"])
130
129
  s.add_dependency(%q<fastercsv>, [">= 0"])
131
130
  s.add_dependency(%q<gbarcode>, [">= 0.98.20"])
131
+ s.add_dependency(%q<rmagick>, [">= 0"])
132
132
  s.add_dependency(%q<shoulda>, [">= 0"])
133
133
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
134
134
  s.add_dependency(%q<jeweler>, ["~> 1.5.1"])
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mead
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 5
10
- version: 0.0.5
9
+ - 6
10
+ version: 0.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jason Ronallo
@@ -20,20 +20,6 @@ default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  version_requirements: &id001 !ruby/object:Gem::Requirement
23
- none: false
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- hash: 3
28
- segments:
29
- - 0
30
- version: "0"
31
- requirement: *id001
32
- prerelease: false
33
- type: :runtime
34
- name: rmagick
35
- - !ruby/object:Gem::Dependency
36
- version_requirements: &id002 !ruby/object:Gem::Requirement
37
23
  none: false
38
24
  requirements:
39
25
  - - "="
@@ -45,12 +31,12 @@ dependencies:
45
31
  - 3
46
32
  - 1
47
33
  version: 1.4.3.1
48
- requirement: *id002
34
+ requirement: *id001
49
35
  prerelease: false
50
36
  type: :runtime
51
37
  name: nokogiri
52
38
  - !ruby/object:Gem::Dependency
53
- version_requirements: &id003 !ruby/object:Gem::Requirement
39
+ version_requirements: &id002 !ruby/object:Gem::Requirement
54
40
  none: false
55
41
  requirements:
56
42
  - - ">="
@@ -59,12 +45,12 @@ dependencies:
59
45
  segments:
60
46
  - 0
61
47
  version: "0"
62
- requirement: *id003
48
+ requirement: *id002
63
49
  prerelease: false
64
50
  type: :runtime
65
51
  name: json
66
52
  - !ruby/object:Gem::Dependency
67
- version_requirements: &id004 !ruby/object:Gem::Requirement
53
+ version_requirements: &id003 !ruby/object:Gem::Requirement
68
54
  none: false
69
55
  requirements:
70
56
  - - ">="
@@ -73,12 +59,12 @@ dependencies:
73
59
  segments:
74
60
  - 0
75
61
  version: "0"
76
- requirement: *id004
62
+ requirement: *id003
77
63
  prerelease: false
78
64
  type: :runtime
79
65
  name: trollop
80
66
  - !ruby/object:Gem::Dependency
81
- version_requirements: &id005 !ruby/object:Gem::Requirement
67
+ version_requirements: &id004 !ruby/object:Gem::Requirement
82
68
  none: false
83
69
  requirements:
84
70
  - - ">="
@@ -87,12 +73,12 @@ dependencies:
87
73
  segments:
88
74
  - 0
89
75
  version: "0"
90
- requirement: *id005
76
+ requirement: *id004
91
77
  prerelease: false
92
78
  type: :runtime
93
79
  name: fastercsv
94
80
  - !ruby/object:Gem::Dependency
95
- version_requirements: &id006 !ruby/object:Gem::Requirement
81
+ version_requirements: &id005 !ruby/object:Gem::Requirement
96
82
  none: false
97
83
  requirements:
98
84
  - - ">="
@@ -103,10 +89,24 @@ dependencies:
103
89
  - 98
104
90
  - 20
105
91
  version: 0.98.20
106
- requirement: *id006
92
+ requirement: *id005
107
93
  prerelease: false
108
- type: :runtime
94
+ type: :development
109
95
  name: gbarcode
96
+ - !ruby/object:Gem::Dependency
97
+ version_requirements: &id006 !ruby/object:Gem::Requirement
98
+ none: false
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ hash: 3
103
+ segments:
104
+ - 0
105
+ version: "0"
106
+ requirement: *id006
107
+ prerelease: false
108
+ type: :development
109
+ name: rmagick
110
110
  - !ruby/object:Gem::Dependency
111
111
  version_requirements: &id007 !ruby/object:Gem::Requirement
112
112
  none: false