bb-epub 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +3 -3
- data/lib/bb-epub/transform/nav_toc.rb +3 -3
- data/lib/bb-epub/version.rb +1 -1
- metadata +6 -6
data/README.md
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
# BbEPUB
|
2
2
|
|
3
3
|
|
4
|
-
EPUB 2 and EPUB 3
|
4
|
+
EPUB 2 and EPUB 3 format support for the Bookbinder gem.
|
5
5
|
|
6
6
|
|
7
7
|
## HOWTO
|
8
8
|
|
9
9
|
$ bundle
|
10
10
|
|
11
|
-
$ bundle exec irb -
|
11
|
+
$ bundle exec irb -rbb-epub
|
12
12
|
|
13
|
-
>>
|
13
|
+
>> Bookbinder::Operations.convert('tmp/book.epub', 'tmp/book')
|
14
14
|
|
@@ -70,13 +70,13 @@ class BbEPUB::Transform::NavToc < Bookbinder::Transform
|
|
70
70
|
|
71
71
|
def extract_ncx_chapter(doc, point, base_path)
|
72
72
|
{
|
73
|
-
'title' => doc.find_within(point, 'text').text,
|
73
|
+
'title' => doc.find_within(point, 'ncx|text').text,
|
74
74
|
'path' => resolved_path(
|
75
75
|
base_path,
|
76
|
-
doc.find_within(point, 'content')['src']
|
76
|
+
doc.find_within(point, 'ncx|content')['src']
|
77
77
|
)
|
78
78
|
}.tap { |out|
|
79
|
-
children = doc.search_within(point, '> navPoint')
|
79
|
+
children = doc.search_within(point, '> ncx|navPoint')
|
80
80
|
if children.any?
|
81
81
|
out['contents'] = children.collect { |pt|
|
82
82
|
extract_ncx_chapter(doc, pt, base_path)
|
data/lib/bb-epub/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bb-epub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
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: 2015-
|
12
|
+
date: 2015-04-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bookbinder
|
16
|
-
requirement: &
|
16
|
+
requirement: &13817180 !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: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *13817180
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rake
|
27
|
-
requirement: &
|
27
|
+
requirement: &13816300 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *13816300
|
36
36
|
description: EPUB 2 & EPUB 3 support for Bookbinder.
|
37
37
|
email:
|
38
38
|
- jpearson@overdrive.com
|