stead 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +9 -5
- data/VERSION +1 -1
- data/lib/stead/ead.rb +5 -3
- metadata +4 -4
data/README.rdoc
CHANGED
@@ -22,6 +22,11 @@ csv2ead to output an EAD XML document. Enjoy.
|
|
22
22
|
The EAD XML template is based off of the output generated by Archivists' Toolkit,
|
23
23
|
but should work with other systems and XSL stylesheets.
|
24
24
|
|
25
|
+
== Try it!
|
26
|
+
|
27
|
+
Steady[https://github.com/jronallo/steady] is a Rails application which
|
28
|
+
wraps stead. You can try it here: http://steady.heroku.com
|
29
|
+
|
25
30
|
== Requirements
|
26
31
|
|
27
32
|
Ruby
|
@@ -57,9 +62,10 @@ Please let me know what else you need in such a tool and I'll try to work it in.
|
|
57
62
|
== Limitations
|
58
63
|
|
59
64
|
- Some of this is still be NCSU and possibly Archivists' Toolkit specific.
|
60
|
-
-
|
61
|
-
- Only
|
62
|
-
|
65
|
+
- Only works with this specific schema. Please submit ideas for expansion.
|
66
|
+
- Only known to work with series at the c01 level and files at the c02 level.
|
67
|
+
Other deeper levels of nesting will not currently work. May work with subseries
|
68
|
+
or with no series at all.
|
63
69
|
- Column values like series must be duplicated for each row.
|
64
70
|
|
65
71
|
== Ruby versions
|
@@ -73,10 +79,8 @@ Tested with the following Rubies:
|
|
73
79
|
|
74
80
|
- More tests (though there are already lots of tests).
|
75
81
|
- Better documentation on the CSV file schema.
|
76
|
-
- Rdoc.
|
77
82
|
- Automate tests of csv2ead tool.
|
78
83
|
- Expand the schema to other parts of the EAD?
|
79
|
-
- Create webapp where a user can submit a CSV file and get returned the EAD.
|
80
84
|
|
81
85
|
== Author
|
82
86
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.5
|
data/lib/stead/ead.rb
CHANGED
@@ -23,7 +23,7 @@ module Stead
|
|
23
23
|
def self.from_csv(csv, opts={})
|
24
24
|
lines = csv.split(/\r\n|\n/)
|
25
25
|
100.times do
|
26
|
-
lines[0] = lines.first.gsub(',,', ',
|
26
|
+
lines[0] = lines.first.gsub(',,', ',"",')
|
27
27
|
end
|
28
28
|
csv = lines.join("\n")
|
29
29
|
self.new(opts.merge(:csv => csv))
|
@@ -172,9 +172,11 @@ module Stead
|
|
172
172
|
['1', '2', '3'].each do |container_number|
|
173
173
|
container_type = cp['container ' + container_number + ' type']
|
174
174
|
container_number = cp['container ' + container_number + ' number']
|
175
|
-
if !container_type.nil? and !container_number.nil?
|
175
|
+
if !container_type.nil? and !container_number.nil? and !container_type.empty? and !container_number.empty?
|
176
|
+
container_type.strip!
|
176
177
|
unless valid_container_type?(container_type)
|
177
|
-
|
178
|
+
debugger
|
179
|
+
raise Stead::InvalidContainerType, %Q{"#{container_type}"}
|
178
180
|
end
|
179
181
|
container = node('container')
|
180
182
|
container['type'] = container_type
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stead
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jason Ronallo
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2011-02-24 00:00:00 -05:00
|
19
19
|
default_executable: csv2ead
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|