epub-parser 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/MIT-LICENSE +1 -1
- data/README +7 -0
- data/lib/epub/book.rb +7 -1
- data/lib/epub/constants.rb +29 -0
- data/lib/epub/parser.rb +11 -3
- data/lib/epub/parser/publication.rb +14 -3
- data/lib/epub/parser/version.rb +1 -1
- data/lib/epub/publication/package.rb +6 -1
- data/lib/epub/publication/package/guide.rb +37 -2
- data/lib/epub/publication/package/manifest.rb +41 -4
- data/test/fixtures/book.epub +0 -0
- data/test/fixtures/book/OPS//343/203/253/343/203/274/343/203/210/343/203/225/343/202/241/343/202/244/343/203/253.opf +12 -2
- data/test/test_parser_publication.rb +73 -4
- metadata +26 -73
- data/doc/EPUB.html +0 -143
- data/doc/EPUB/Book.html +0 -616
- data/doc/EPUB/Constants.html +0 -130
- data/doc/EPUB/Constants/Type.html +0 -118
- data/doc/EPUB/ContentDocument.html +0 -108
- data/doc/EPUB/ContentDocument/Navigation.html +0 -673
- data/doc/EPUB/ContentDocument/Navigation/Nav.html +0 -563
- data/doc/EPUB/ContentDocument/Navigation/Nav/Ol.html +0 -285
- data/doc/EPUB/ContentDocument/Navigation/Nav/Ol/A.html +0 -354
- data/doc/EPUB/ContentDocument/Navigation/Nav/Ol/Span.html +0 -354
- data/doc/EPUB/OCF.html +0 -135
- data/doc/EPUB/OCF/Container.html +0 -358
- data/doc/EPUB/OCF/Container/Rootfile.html +0 -257
- data/doc/EPUB/OCF/Encryption.html +0 -111
- data/doc/EPUB/OCF/Manifest.html +0 -111
- data/doc/EPUB/OCF/Metadata.html +0 -111
- data/doc/EPUB/OCF/Rights.html +0 -111
- data/doc/EPUB/OCF/Signatures.html +0 -111
- data/doc/EPUB/Parser.html +0 -448
- data/doc/EPUB/Parser/ContentDocument.html +0 -531
- data/doc/EPUB/Parser/OCF.html +0 -635
- data/doc/EPUB/Parser/Publication.html +0 -640
- data/doc/EPUB/Publication.html +0 -108
- data/doc/EPUB/Publication/Package.html +0 -751
- data/doc/EPUB/Publication/Package/Bindings.html +0 -267
- data/doc/EPUB/Publication/Package/Bindings/MediaType.html +0 -257
- data/doc/EPUB/Publication/Package/Guide.html +0 -111
- data/doc/EPUB/Publication/Package/Manifest.html +0 -578
- data/doc/EPUB/Publication/Package/Manifest/Item.html +0 -669
- data/doc/EPUB/Publication/Package/Metadata.html +0 -257
- data/doc/EPUB/Publication/Package/Spine.html +0 -755
- data/doc/EPUB/Publication/Package/Spine/Itemref.html +0 -558
- data/doc/EPUB/Type.html +0 -118
- data/doc/_index.html +0 -422
- data/doc/class_list.html +0 -47
- data/doc/css/common.css +0 -1
- data/doc/css/full_list.css +0 -55
- data/doc/css/style.css +0 -322
- data/doc/file.README.html +0 -76
- data/doc/file_list.html +0 -49
- data/doc/frames.html +0 -13
- data/doc/index.html +0 -76
- data/doc/js/app.js +0 -205
- data/doc/js/full_list.js +0 -167
- data/doc/js/jquery.js +0 -16
- data/doc/method_list.html +0 -902
- data/doc/top-level-namespace.html +0 -103
data/.gitignore
CHANGED
data/MIT-LICENSE
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright (c) 2011 KITAITIMAKOTO <KitaitiMakoto@gmail.com>
|
1
|
+
Copyright (c) 2011, 2012 KITAITIMAKOTO <KitaitiMakoto@gmail.com>
|
2
2
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
4
4
|
|
data/README
CHANGED
data/lib/epub/book.rb
CHANGED
@@ -14,6 +14,7 @@ module EPUB
|
|
14
14
|
enum
|
15
15
|
end
|
16
16
|
end
|
17
|
+
|
17
18
|
def each_page_by_toc(&blk)
|
18
19
|
end
|
19
20
|
|
@@ -29,9 +30,14 @@ module EPUB
|
|
29
30
|
def other_navigation
|
30
31
|
end
|
31
32
|
|
32
|
-
# Syntax
|
33
|
+
# Syntax sugar
|
33
34
|
def rootfile_path
|
34
35
|
ocf.container.rootfile.full_path
|
35
36
|
end
|
37
|
+
|
38
|
+
# Syntax sugar
|
39
|
+
def cover_image
|
40
|
+
package.manifest.cover_image
|
41
|
+
end
|
36
42
|
end
|
37
43
|
end
|
data/lib/epub/constants.rb
CHANGED
@@ -9,11 +9,40 @@ module EPUB
|
|
9
9
|
'm' => 'http://www.w3.org/1998/Math/MathML',
|
10
10
|
'svg' => 'http://www.w3.org/2000/svg'
|
11
11
|
}
|
12
|
+
|
12
13
|
module Type
|
13
14
|
TOC = 'toc'
|
14
15
|
PAGE_LIST = 'page_list'
|
15
16
|
LANDMARKS = 'landmarks'
|
16
17
|
end
|
18
|
+
|
19
|
+
module MediaType
|
20
|
+
class NotSupportedError < StandardError; end
|
21
|
+
|
22
|
+
IMAGE = %w[
|
23
|
+
image/gif
|
24
|
+
image/jpeg
|
25
|
+
image/png
|
26
|
+
image/svg+xml
|
27
|
+
]
|
28
|
+
APPLICATION = %w[
|
29
|
+
application/xhtml+xml
|
30
|
+
application/x-dtbncx+xml
|
31
|
+
application/vnd.ms-opentype
|
32
|
+
application/font-woff
|
33
|
+
application/smil+xml
|
34
|
+
application/pls+xml
|
35
|
+
]
|
36
|
+
AUDIO = %w[
|
37
|
+
audio/mpeg
|
38
|
+
audio/mp4
|
39
|
+
]
|
40
|
+
TEXT = %w[
|
41
|
+
text/css
|
42
|
+
text/javascript
|
43
|
+
]
|
44
|
+
CORE = IMAGE + APPLICATION + AUDIO + TEXT
|
45
|
+
end
|
17
46
|
end
|
18
47
|
|
19
48
|
include Constants
|
data/lib/epub/parser.rb
CHANGED
@@ -4,13 +4,20 @@ require 'epub/parser/version'
|
|
4
4
|
require 'epub/parser/ocf'
|
5
5
|
require 'epub/parser/publication'
|
6
6
|
require 'epub/parser/content_document'
|
7
|
+
require 'shellwords'
|
7
8
|
require 'nokogiri'
|
8
9
|
|
9
10
|
module EPUB
|
10
11
|
class Parser
|
12
|
+
class << self
|
13
|
+
def parse(file, dir, options = {})
|
14
|
+
new(file, dir, options).parse
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
11
18
|
def initialize(filepath, root_directory, options = {})
|
12
|
-
raise
|
13
|
-
raise
|
19
|
+
raise "File #{filepath} not readable" unless File.readable_real? filepath
|
20
|
+
raise "File #{root_directory} already exists" if File.file? root_directory
|
14
21
|
|
15
22
|
@filepath = File.realpath filepath
|
16
23
|
Dir.mkdir(root_directory) unless File.directory? root_directory
|
@@ -19,8 +26,9 @@ module EPUB
|
|
19
26
|
@book = Book.new
|
20
27
|
|
21
28
|
unzip_cmd = options['unzip-command'] || 'unzip'
|
22
|
-
unzip_cmd << " #{@filepath} -d #{@dir}"
|
29
|
+
unzip_cmd << " #{@filepath.to_s.shellescape} -d #{@dir.to_s.shellescape}"
|
23
30
|
system unzip_cmd
|
31
|
+
puts unzip_cmd
|
24
32
|
end
|
25
33
|
|
26
34
|
def parse
|
@@ -22,7 +22,7 @@ module EPUB
|
|
22
22
|
# parse_metadata
|
23
23
|
parse_manifest
|
24
24
|
parse_spine
|
25
|
-
|
25
|
+
parse_guide
|
26
26
|
# parse_bindings
|
27
27
|
|
28
28
|
@package
|
@@ -43,7 +43,8 @@ module EPUB
|
|
43
43
|
%w[ id media-type media-overlay ].each do |attr|
|
44
44
|
item.send "#{attr.gsub(/-/, '_')}=", elm[attr]
|
45
45
|
end
|
46
|
-
item.href =
|
46
|
+
item.href = elm['href']
|
47
|
+
item.iri = @rootfile.join Addressable::URI.parse(elm['href'])
|
47
48
|
fallback_map[elm['fallback']] = item if elm['fallback']
|
48
49
|
item.properties = elm['properties'] ? elm['properties'].split(' ') : []
|
49
50
|
manifest << item
|
@@ -76,7 +77,17 @@ module EPUB
|
|
76
77
|
end
|
77
78
|
|
78
79
|
def parse_guide
|
79
|
-
|
80
|
+
guide = @package.guide = EPUB::Publication::Package::Guide.new
|
81
|
+
elem = @doc.xpath('/opf:package/opf:guide/opf:reference', EPUB::NAMESPACES).each do |ref|
|
82
|
+
reference = EPUB::Publication::Package::Guide::Reference.new
|
83
|
+
%w[ type title href ].each do |attr|
|
84
|
+
reference.send("#{attr}=", ref[attr])
|
85
|
+
end
|
86
|
+
reference.iri = @rootfile.join Addressable::URI.parse(reference.href)
|
87
|
+
guide << reference
|
88
|
+
end
|
89
|
+
|
90
|
+
guide
|
80
91
|
end
|
81
92
|
|
82
93
|
def parse_bindings
|
data/lib/epub/parser/version.rb
CHANGED
@@ -4,7 +4,7 @@ module EPUB
|
|
4
4
|
module Publication
|
5
5
|
class Package
|
6
6
|
attr_accessor :version, :unique_identifier, :prefix, :xml_lang, :dir, :id
|
7
|
-
attr_reader :metadata, :manifest, :spine
|
7
|
+
attr_reader :metadata, :manifest, :spine, :guide
|
8
8
|
alias lang xml_lang
|
9
9
|
alias lang= xml_lang=
|
10
10
|
|
@@ -20,6 +20,11 @@ module EPUB
|
|
20
20
|
spine.package = self
|
21
21
|
@spine = spine
|
22
22
|
end
|
23
|
+
|
24
|
+
def guide=(guide)
|
25
|
+
guide.package = self
|
26
|
+
@guide = guide
|
27
|
+
end
|
23
28
|
end
|
24
29
|
end
|
25
30
|
end
|
@@ -1,10 +1,45 @@
|
|
1
|
-
|
2
|
-
# See OPF2 for specification
|
1
|
+
require 'enumerabler'
|
3
2
|
|
4
3
|
module EPUB
|
5
4
|
module Publication
|
6
5
|
class Package
|
7
6
|
class Guide
|
7
|
+
attr_accessor :package
|
8
|
+
|
9
|
+
def references
|
10
|
+
@references ||= []
|
11
|
+
end
|
12
|
+
|
13
|
+
def <<(reference)
|
14
|
+
reference.guide = self
|
15
|
+
references << reference
|
16
|
+
end
|
17
|
+
|
18
|
+
# Should use epub:type list?
|
19
|
+
%w[cover title-page toc index glossary acknowledgements bibliography colophon copyright-page dedication epigraph foreword loi lot notes preface text].each do |type|
|
20
|
+
define_method type do
|
21
|
+
var = instance_variable_get "@#{type}"
|
22
|
+
return var if var
|
23
|
+
|
24
|
+
var = references.selector {|ref| ref.type == type.to_s}.first
|
25
|
+
instance_variable_set "@#{type}", var
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
class Reference
|
30
|
+
attr_accessor :guide,
|
31
|
+
:type, :title, :href,
|
32
|
+
:iri
|
33
|
+
|
34
|
+
def item
|
35
|
+
return @item if @item
|
36
|
+
|
37
|
+
len = iri.fragment.nil? ? 1 : iri.fragment.length + 2
|
38
|
+
@item = @guide.package.manifest.items.selector do |item|
|
39
|
+
item.href == href[0 .. -len]
|
40
|
+
end.first
|
41
|
+
end
|
42
|
+
end
|
8
43
|
end
|
9
44
|
end
|
10
45
|
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'enumerabler'
|
2
|
+
require 'epub/constants'
|
2
3
|
|
3
4
|
module EPUB
|
4
5
|
module Publication
|
@@ -24,18 +25,54 @@ module EPUB
|
|
24
25
|
navs.first
|
25
26
|
end
|
26
27
|
|
28
|
+
def cover_image
|
29
|
+
items.selector {|i| i.properties.include? 'cover-image'}.first
|
30
|
+
end
|
31
|
+
|
27
32
|
def [](item_id)
|
28
33
|
items.selector {|item| item.id == item_id}.first
|
29
34
|
end
|
30
35
|
|
31
36
|
class Item
|
32
37
|
attr_accessor :manifest,
|
33
|
-
:id, :href, :media_type, :fallback, :properties, :media_overlay
|
38
|
+
:id, :href, :media_type, :fallback, :properties, :media_overlay,
|
39
|
+
:iri
|
40
|
+
|
41
|
+
# To do: Handle circular fallback chain
|
42
|
+
def fallback_chain
|
43
|
+
return @fallback_chain if @fallback_chain
|
44
|
+
@fallback_chain = traverse_fallback_chain([])
|
45
|
+
end
|
46
|
+
|
47
|
+
def read
|
48
|
+
open(iri) {|file| file.read}
|
49
|
+
end
|
50
|
+
|
51
|
+
# To do: Handle circular fallback chain
|
52
|
+
def use_fallback_chain(options = {})
|
53
|
+
supported = EPUB::MediaType::CORE
|
54
|
+
if ad = options[:supported]
|
55
|
+
supported = supported | (ad.respond_to?(:to_ary) ? ad : [ad])
|
56
|
+
end
|
57
|
+
if del = options[:not_supported]
|
58
|
+
supported = supported - (del.respond_to?(:to_ary) ? del : [del])
|
59
|
+
end
|
60
|
+
|
61
|
+
if supported.include? media_type
|
62
|
+
yield self
|
63
|
+
elsif fallback
|
64
|
+
fallback.use_fallback_chain(options) {|fallbacked| yield fallbacked}
|
65
|
+
else
|
66
|
+
raise EPUB::MediaType::NotSupportedError
|
67
|
+
end
|
68
|
+
end
|
34
69
|
|
35
|
-
|
70
|
+
protected
|
36
71
|
|
37
|
-
def
|
38
|
-
|
72
|
+
def traverse_fallback_chain(chain)
|
73
|
+
chain << self
|
74
|
+
return chain unless fallback
|
75
|
+
fallback.traverse_fallback_chain(chain)
|
39
76
|
end
|
40
77
|
end
|
41
78
|
end
|
data/test/fixtures/book.epub
CHANGED
Binary file
|
@@ -10,14 +10,21 @@
|
|
10
10
|
properties="nav"/>
|
11
11
|
<item id="manifest-item-1"
|
12
12
|
href="item-1.xhtml"
|
13
|
-
media-type="application/
|
13
|
+
media-type="application/pdf"
|
14
14
|
properties="property1 property2 property3"/>
|
15
15
|
<item id="manifest-item-2"
|
16
16
|
href="item-2.xhtml"
|
17
|
-
media-type="application/
|
17
|
+
media-type="application/pdf"
|
18
18
|
fallback="manifest-item-fallback"/>
|
19
19
|
<item id="manifest-item-fallback"
|
20
20
|
href="fallback.xhtml"
|
21
|
+
media-type="image/svg+xml"
|
22
|
+
fallback="manifest-item-fallback2"/>
|
23
|
+
<item id="manifest-item-fallback2"
|
24
|
+
href="fallback2.xhtml"
|
25
|
+
media-type="application/xhtml+xml"/>
|
26
|
+
<item id="cover"
|
27
|
+
href="cover.xhtml"
|
21
28
|
media-type="application/xhtml+xml"/>
|
22
29
|
</manifest>
|
23
30
|
<spine>
|
@@ -25,4 +32,7 @@
|
|
25
32
|
<itemref idref="manifest-item-1"/>
|
26
33
|
<itemref idref="manifest-item-2"/>
|
27
34
|
</spine>
|
35
|
+
<guide>
|
36
|
+
<reference type="cover" href="cover.xhtml#start" title="カバー"/>
|
37
|
+
</guide>
|
28
38
|
</package>
|
@@ -13,14 +13,14 @@ class TestParserPublication < Test::Unit::TestCase
|
|
13
13
|
@manifest = @parser.parse_manifest
|
14
14
|
end
|
15
15
|
|
16
|
-
def
|
17
|
-
assert_equal
|
16
|
+
def test_manifest_has_6_items
|
17
|
+
assert_equal 6, @manifest.items.length
|
18
18
|
end
|
19
19
|
|
20
|
-
def
|
20
|
+
def test_item_has_full_path_as_iri_attribute
|
21
21
|
actual = File.expand_path 'fixtures/book/OPS/nav.xhtml', File.dirname(__FILE__)
|
22
22
|
|
23
|
-
assert_equal actual, @manifest['nav'].
|
23
|
+
assert_equal actual, @manifest['nav'].iri.to_s
|
24
24
|
end
|
25
25
|
|
26
26
|
def test_fallback_attribute_of_item_should_be_item_object
|
@@ -29,5 +29,74 @@ class TestParserPublication < Test::Unit::TestCase
|
|
29
29
|
assert_instance_of Publication::Package::Manifest::Item, fallback
|
30
30
|
assert_equal 'manifest-item-fallback', fallback.id
|
31
31
|
end
|
32
|
+
|
33
|
+
def test_item_is_readable
|
34
|
+
item = @manifest.items.first
|
35
|
+
doc = Nokogiri.XML item.read
|
36
|
+
|
37
|
+
assert_equal 'html', doc.root.name
|
38
|
+
end
|
39
|
+
|
40
|
+
def test_item_can_traverse_fallback_chain
|
41
|
+
assert_equal [@manifest['manifest-item-2'], @manifest['manifest-item-fallback'], @manifest['manifest-item-fallback2']],
|
42
|
+
@manifest['manifest-item-2'].fallback_chain
|
43
|
+
end
|
44
|
+
|
45
|
+
def test_item_always_has_fallback_chain_including_itself
|
46
|
+
item = @manifest['manifest-item-1']
|
47
|
+
|
48
|
+
assert_equal [item], item.fallback_chain
|
49
|
+
end
|
50
|
+
|
51
|
+
def test_item_can_use_fallback_chain_when_not_core_media_type_by_default
|
52
|
+
item = @manifest['manifest-item-2']
|
53
|
+
fallback = item.fallback
|
54
|
+
result = item.use_fallback_chain do |current|
|
55
|
+
current
|
56
|
+
end
|
57
|
+
|
58
|
+
assert_equal fallback, result
|
59
|
+
end
|
60
|
+
|
61
|
+
def test_item_can_custome_supported_media_type_in_use_fallback_chain
|
62
|
+
item = @manifest['manifest-item-2']
|
63
|
+
result = item.use_fallback_chain supported: 'application/pdf' do |current|
|
64
|
+
current
|
65
|
+
end
|
66
|
+
|
67
|
+
assert_equal item, result
|
68
|
+
end
|
69
|
+
|
70
|
+
def test_item_can_custome_not_supported_media_type_in_use_fallback_chain
|
71
|
+
item = @manifest['manifest-item-2']
|
72
|
+
fallback = item.fallback.fallback
|
73
|
+
result = item.use_fallback_chain not_supported: 'image/svg+xml' do |current|
|
74
|
+
current
|
75
|
+
end
|
76
|
+
|
77
|
+
assert_equal fallback, result
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
class TestParseGuide < TestParserPublication
|
82
|
+
def setup
|
83
|
+
super
|
84
|
+
@guide = @parser.parse_guide
|
85
|
+
end
|
86
|
+
|
87
|
+
def test_guide_has_one_reference
|
88
|
+
assert_equal 1, @guide.references.length
|
89
|
+
end
|
90
|
+
|
91
|
+
def test_guide_has_cover_reference
|
92
|
+
assert @guide.cover
|
93
|
+
assert_equal 'cover', @guide.cover.type
|
94
|
+
end
|
95
|
+
|
96
|
+
def test_reference_refers_item
|
97
|
+
@parser.parse_manifest
|
98
|
+
|
99
|
+
assert_instance_of EPUB::Publication::Package::Manifest::Item, @guide.cover.item
|
100
|
+
end
|
32
101
|
end
|
33
102
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: epub-parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2012-01-03 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rubygems-test
|
16
|
-
requirement: &
|
16
|
+
requirement: &9485980 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *9485980
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rake
|
27
|
-
requirement: &
|
27
|
+
requirement: &9485300 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *9485300
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: pry
|
38
|
-
requirement: &
|
38
|
+
requirement: &9483760 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *9483760
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: test-unit
|
49
|
-
requirement: &
|
49
|
+
requirement: &9481540 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '2'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *9481540
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: simplecov
|
60
|
-
requirement: &
|
60
|
+
requirement: &9480560 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *9480560
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: thin
|
71
|
-
requirement: &
|
71
|
+
requirement: &9479860 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *9479860
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: yard
|
82
|
-
requirement: &
|
82
|
+
requirement: &9479400 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: '0'
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *9479400
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: epzip
|
93
|
-
requirement: &
|
93
|
+
requirement: &9065560 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: '0'
|
99
99
|
type: :development
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *9065560
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: enumerabler
|
104
|
-
requirement: &
|
104
|
+
requirement: &9064540 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ! '>='
|
@@ -109,10 +109,10 @@ dependencies:
|
|
109
109
|
version: '0'
|
110
110
|
type: :runtime
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *9064540
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: nokogiri
|
115
|
-
requirement: &
|
115
|
+
requirement: &9063520 !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|
118
118
|
- - ! '>='
|
@@ -120,10 +120,10 @@ dependencies:
|
|
120
120
|
version: '0'
|
121
121
|
type: :runtime
|
122
122
|
prerelease: false
|
123
|
-
version_requirements: *
|
123
|
+
version_requirements: *9063520
|
124
124
|
- !ruby/object:Gem::Dependency
|
125
125
|
name: addressable
|
126
|
-
requirement: &
|
126
|
+
requirement: &9062780 !ruby/object:Gem::Requirement
|
127
127
|
none: false
|
128
128
|
requirements:
|
129
129
|
- - ! '>='
|
@@ -131,7 +131,7 @@ dependencies:
|
|
131
131
|
version: '0'
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
|
-
version_requirements: *
|
134
|
+
version_requirements: *9062780
|
135
135
|
description: Parse EPUB 3 book loosely
|
136
136
|
email:
|
137
137
|
- KitaitiMakoto@gmail.com
|
@@ -145,53 +145,6 @@ files:
|
|
145
145
|
- MIT-LICENSE
|
146
146
|
- README
|
147
147
|
- Rakefile
|
148
|
-
- doc/EPUB.html
|
149
|
-
- doc/EPUB/Book.html
|
150
|
-
- doc/EPUB/Constants.html
|
151
|
-
- doc/EPUB/Constants/Type.html
|
152
|
-
- doc/EPUB/ContentDocument.html
|
153
|
-
- doc/EPUB/ContentDocument/Navigation.html
|
154
|
-
- doc/EPUB/ContentDocument/Navigation/Nav.html
|
155
|
-
- doc/EPUB/ContentDocument/Navigation/Nav/Ol.html
|
156
|
-
- doc/EPUB/ContentDocument/Navigation/Nav/Ol/A.html
|
157
|
-
- doc/EPUB/ContentDocument/Navigation/Nav/Ol/Span.html
|
158
|
-
- doc/EPUB/OCF.html
|
159
|
-
- doc/EPUB/OCF/Container.html
|
160
|
-
- doc/EPUB/OCF/Container/Rootfile.html
|
161
|
-
- doc/EPUB/OCF/Encryption.html
|
162
|
-
- doc/EPUB/OCF/Manifest.html
|
163
|
-
- doc/EPUB/OCF/Metadata.html
|
164
|
-
- doc/EPUB/OCF/Rights.html
|
165
|
-
- doc/EPUB/OCF/Signatures.html
|
166
|
-
- doc/EPUB/Parser.html
|
167
|
-
- doc/EPUB/Parser/ContentDocument.html
|
168
|
-
- doc/EPUB/Parser/OCF.html
|
169
|
-
- doc/EPUB/Parser/Publication.html
|
170
|
-
- doc/EPUB/Publication.html
|
171
|
-
- doc/EPUB/Publication/Package.html
|
172
|
-
- doc/EPUB/Publication/Package/Bindings.html
|
173
|
-
- doc/EPUB/Publication/Package/Bindings/MediaType.html
|
174
|
-
- doc/EPUB/Publication/Package/Guide.html
|
175
|
-
- doc/EPUB/Publication/Package/Manifest.html
|
176
|
-
- doc/EPUB/Publication/Package/Manifest/Item.html
|
177
|
-
- doc/EPUB/Publication/Package/Metadata.html
|
178
|
-
- doc/EPUB/Publication/Package/Spine.html
|
179
|
-
- doc/EPUB/Publication/Package/Spine/Itemref.html
|
180
|
-
- doc/EPUB/Type.html
|
181
|
-
- doc/_index.html
|
182
|
-
- doc/class_list.html
|
183
|
-
- doc/css/common.css
|
184
|
-
- doc/css/full_list.css
|
185
|
-
- doc/css/style.css
|
186
|
-
- doc/file.README.html
|
187
|
-
- doc/file_list.html
|
188
|
-
- doc/frames.html
|
189
|
-
- doc/index.html
|
190
|
-
- doc/js/app.js
|
191
|
-
- doc/js/full_list.js
|
192
|
-
- doc/js/jquery.js
|
193
|
-
- doc/method_list.html
|
194
|
-
- doc/top-level-namespace.html
|
195
148
|
- epub-parser.gemspec
|
196
149
|
- lib/epub/book.rb
|
197
150
|
- lib/epub/constants.rb
|
@@ -245,7 +198,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
245
198
|
version: '0'
|
246
199
|
segments:
|
247
200
|
- 0
|
248
|
-
hash:
|
201
|
+
hash: 1208319521840117348
|
249
202
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
250
203
|
none: false
|
251
204
|
requirements:
|
@@ -254,7 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
254
207
|
version: '0'
|
255
208
|
segments:
|
256
209
|
- 0
|
257
|
-
hash:
|
210
|
+
hash: 1208319521840117348
|
258
211
|
requirements: []
|
259
212
|
rubyforge_project:
|
260
213
|
rubygems_version: 1.8.8
|