eadcodec 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,15 @@
1
+ = eadcodec
2
+
3
+ This is an EAD importer/exporter lib based on xmlcodec.
4
+
5
+ == Usage
6
+
7
+ To import a file just do:
8
+
9
+ ead = EAD::EADDocument.from_file('some_ead_file.xml')
10
+
11
+ After that the ead object includes a full hierarchy representing all the content in the file. See the xmlcodec project for more details on the available API's including ways to handle creating and reading unlimited sized files with constant memory usage.
12
+
13
+ == Author
14
+
15
+ Pedro Côrte-Real <pedro@pedrocr.net>
data/Rakefile CHANGED
@@ -1,5 +1,5 @@
1
1
  PKG_NAME = 'eadcodec'
2
- PKG_VERSION = '0.1.2'
2
+ PKG_VERSION = '0.1.3'
3
3
 
4
4
  require 'rake'
5
5
  require 'rake/testtask'
@@ -18,14 +18,16 @@ PKG_FILES = FileList['lib/**/*.rb',
18
18
  'Rakefile']
19
19
 
20
20
  RDOC_OPTIONS = ['-S', '-w 2', '-N', '-Axmlsubel_mult=XML Subelement Collection',
21
- '-Axmlsubel=XML Subelement', '-Axmlattr=XML Attribute']
22
- RDOC_EXTRA_FILES = ['README']
21
+ '-Axmlsubel=XML Subelement', '-Axmlattr=XML Attribute',
22
+ '-c utf8' ]
23
+ RDOC_EXTRA_FILES = ['README.rdoc']
23
24
  CODE_FILES = 'lib/**/*.rb'
24
25
  TEST_FILES = 'test/**/*.rb'
25
26
 
26
27
  spec = Gem::Specification.new do |s|
27
28
  s.platform = Gem::Platform::RUBY
28
29
  s.summary = "Importer/Exporter for the EAD XML format"
30
+ s.homepage = "http://github.com/pedrocr/eadcodec"
29
31
  s.name = PKG_NAME
30
32
  s.version = PKG_VERSION
31
33
  s.author = 'Pedro Côrte-Real'
@@ -33,7 +35,6 @@ spec = Gem::Specification.new do |s|
33
35
  s.requirements << 'xmlcodec'
34
36
  s.add_dependency('xmlcodec', '>= 0.1.0')
35
37
  s.require_path = 'lib'
36
- s.autorequire = 'rake'
37
38
  s.files = PKG_FILES
38
39
  s.has_rdoc = true
39
40
  s.rdoc_options = RDOC_OPTIONS
@@ -54,10 +55,10 @@ Rake::TestTask.new do |t|
54
55
  end
55
56
 
56
57
  Rake::RDocTask.new do |rd|
57
- rd.main = "README"
58
+ rd.main = "README.rdoc"
58
59
  rd.name = :docs
59
60
  rd.rdoc_files.include(RDOC_EXTRA_FILES, CODE_FILES)
60
- rd.rdoc_dir = 'web/doc'
61
+ rd.rdoc_dir = 'doc'
61
62
  rd.title = PKG_NAME+' API'
62
63
  rd.options = RDOC_OPTIONS
63
64
  end
@@ -45,8 +45,6 @@ module EADCodec
45
45
  sclass "Ref", "ref"
46
46
  sclass "LinkGrp", "linkgrp"
47
47
  sclass "Title", "title"
48
-
49
-
50
48
 
51
49
  # Module included in classes that have paragraphs as subelements
52
50
  module WithParagraphs
@@ -12,3 +12,11 @@ class Date < EADElement
12
12
  xmlattr :normal
13
13
  xmlattr :type
14
14
  end
15
+
16
+ class UnitDate < Date
17
+ elname "unitdate"
18
+ elwithvalue
19
+
20
+ xmlattr :datechar
21
+ xmlattr :label
22
+ end
metadata CHANGED
@@ -1,21 +1,21 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eadcodec
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 2
10
- version: 0.1.2
9
+ - 3
10
+ version: 0.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Pedro C\xC3\xB4rte-Real"
14
- autorequire: rake
14
+ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-14 00:00:00 +01:00
18
+ date: 2010-12-26 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -43,7 +43,7 @@ executables: []
43
43
  extensions: []
44
44
 
45
45
  extra_rdoc_files:
46
- - README
46
+ - README.rdoc
47
47
  files:
48
48
  - lib/eadcodec.rb
49
49
  - lib/elements/physfacet.rb
@@ -76,7 +76,6 @@ files:
76
76
  - lib/elements/processinfo.rb
77
77
  - lib/elements/ead.rb
78
78
  - lib/elements/odd.rb
79
- - lib/elements/unitdate.rb
80
79
  - lib/elements/userestrict.rb
81
80
  - lib/elements/creation.rb
82
81
  - lib/elements/arrangement.rb
@@ -117,11 +116,11 @@ files:
117
116
  - test/subtitle_test.rb
118
117
  - test/examples/example1.xml
119
118
  - test/examples/example2.xml
120
- - README
119
+ - README.rdoc
121
120
  - LICENSE
122
121
  - Rakefile
123
122
  has_rdoc: true
124
- homepage:
123
+ homepage: http://github.com/pedrocr/eadcodec
125
124
  licenses: []
126
125
 
127
126
  post_install_message:
@@ -132,6 +131,7 @@ rdoc_options:
132
131
  - -Axmlsubel_mult=XML Subelement Collection
133
132
  - -Axmlsubel=XML Subelement
134
133
  - -Axmlattr=XML Attribute
134
+ - -c utf8
135
135
  require_paths:
136
136
  - lib
137
137
  required_ruby_version: !ruby/object:Gem::Requirement
data/README DELETED
@@ -1,22 +0,0 @@
1
- This is an EAD importer/exporter lib. Basic usage should be pretty simple.
2
- Importing EAD files stuffs ruby objects with the values in the file. Exporting
3
- does the opposite.
4
-
5
- To import a file just do:
6
-
7
- ead = EAD::EADDocument.from_file('some_ead_file.xml')
8
-
9
- All the file will be imported and it's whole contents loaded into memory. For
10
- big files this is a problem so you should look at
11
- XMLCodec::XMLStreamObjectParser instead from the xmlcodec framework on which
12
- this library depends on.
13
-
14
- The XMLCodec module has some nice utility classes and functions to handle any
15
- kind of XML file. XMLCodec::XMLElement can be used to define an importer and
16
- exporter for any XML format. XMLCodec::XMLStreamObjectParser is designed to work
17
- with it allowing for stream parsing of XML files of arbitrary length with
18
- constant memory usage while still treating elements as ruby objects.
19
-
20
- Author:
21
- Pedro Côrte-Real
22
- <pedro@pedrocr.net>
@@ -1,7 +0,0 @@
1
- class UnitDate < Date
2
- elname "unitdate"
3
- elwithvalue
4
-
5
- xmlattr :datechar
6
- xmlattr :label
7
- end