epubbery 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +1 -0
- data/Gemfile.lock +8 -7
- data/README.rdoc +33 -2
- data/VERSION +1 -1
- data/bin/epubbery +4 -4
- data/config_sample.yml +1 -0
- data/epubbery.gemspec +8 -5
- data/lib/chapter.rb +4 -0
- data/lib/{epub_setup.rb → epub.rb} +29 -22
- data/lib/epubbery.rb +1 -1
- data/spec/{epub_setup_spec.rb → epub_spec.rb} +22 -8
- metadata +41 -27
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
-
RedCloth (4.2.
|
4
|
+
RedCloth (4.2.7)
|
5
5
|
diff-lcs (1.1.2)
|
6
6
|
git (1.2.5)
|
7
|
-
jeweler (1.5.
|
7
|
+
jeweler (1.5.2)
|
8
8
|
bundler (~> 1.0.0)
|
9
9
|
git (>= 1.2.5)
|
10
10
|
rake
|
11
11
|
linguistics (1.0.8)
|
12
12
|
liquid (2.2.2)
|
13
13
|
macaddr (1.0.0)
|
14
|
-
rake (0.
|
14
|
+
rake (0.9.2)
|
15
15
|
rcov (0.9.9)
|
16
16
|
rspec (2.2.0)
|
17
17
|
rspec-core (~> 2.2)
|
18
18
|
rspec-expectations (~> 2.2)
|
19
19
|
rspec-mocks (~> 2.2)
|
20
|
-
rspec-core (2.
|
21
|
-
rspec-expectations (2.
|
20
|
+
rspec-core (2.6.4)
|
21
|
+
rspec-expectations (2.6.0)
|
22
22
|
diff-lcs (~> 1.1.2)
|
23
|
-
rspec-mocks (2.
|
24
|
-
uuid (2.3.
|
23
|
+
rspec-mocks (2.6.0)
|
24
|
+
uuid (2.3.2)
|
25
25
|
macaddr (~> 1.0)
|
26
26
|
|
27
27
|
PLATFORMS
|
@@ -33,6 +33,7 @@ DEPENDENCIES
|
|
33
33
|
jeweler (~> 1.5.1)
|
34
34
|
linguistics
|
35
35
|
liquid
|
36
|
+
rake
|
36
37
|
rcov
|
37
38
|
rspec (~> 2.2.0)
|
38
39
|
uuid
|
data/README.rdoc
CHANGED
@@ -3,15 +3,46 @@
|
|
3
3
|
Generates a template directory that you can use to build a custom epub file.
|
4
4
|
|
5
5
|
Usage:
|
6
|
-
|
6
|
+
epubbery /path/to/new/book
|
7
7
|
(if the directory does not exist, it will be created)
|
8
8
|
|
9
9
|
Go to the new directory and modify the file config.yml
|
10
10
|
|
11
|
-
Run
|
11
|
+
Run epubbery from within the new directory.
|
12
12
|
|
13
13
|
Text files will be html-ized using textile (via the RedCloth gem). Check the templates directory for files you may want to customize (such as stylesheet.css or the .liquid html files).
|
14
14
|
|
15
|
+
== meta tags in text files
|
16
|
+
Any line at the top of a text file that matches a single word followed by a colon, followed by any text, will become a meta tag-like variable for that "chapter". For example, if you have:
|
17
|
+
Date: 1999
|
18
|
+
Subhead: Party Time
|
19
|
+
|
20
|
+
Then your chapter will have a "meta" hash with those attributes:
|
21
|
+
chapter.meta['date'] == '1999'
|
22
|
+
chapter.meta['subhead'] == 'Party Time'
|
23
|
+
|
24
|
+
Additionally, there are a couple of special meta tags that will be used for functional purposes:
|
25
|
+
Name: _string_ - will always be availble as chapter.name
|
26
|
+
Position: _number_ - will be set to chapter.number and used in sorting
|
27
|
+
Number: _number_ - will be set to chapter.number and used in sorting
|
28
|
+
Chapter: _number_ - will be set to chapter.number and used in sorting
|
29
|
+
Template: see below
|
30
|
+
|
31
|
+
== Templates
|
32
|
+
You'll find a few liquid templates in the OEBPS directory of your project. Feel free to edit these as desired using liquid syntax:
|
33
|
+
http://www.liquidmarkup.org/
|
34
|
+
By default, all text files will use the chapter.html.liquid template. You can override this default in config.yml, as well as on a file-by-file basis (by using the special meta tag "Template: whatever").
|
35
|
+
|
36
|
+
Any meta tags as described previously will be available in the liquid templates.
|
37
|
+
|
38
|
+
Helper functions for chapters:
|
39
|
+
name
|
40
|
+
number_or_name
|
41
|
+
number_as_word
|
42
|
+
name_or_number
|
43
|
+
word_count
|
44
|
+
html
|
45
|
+
|
15
46
|
== Converting to PDF
|
16
47
|
|
17
48
|
After you've created an epub file, you can easily convert it to PDF. Here are a couple of hints:
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
data/bin/epubbery
CHANGED
@@ -7,7 +7,7 @@ $: << File.join(@gem_dir, 'lib')
|
|
7
7
|
require 'fileutils'
|
8
8
|
require File.join(@gem_dir, 'lib', 'epubbery')
|
9
9
|
|
10
|
-
|
10
|
+
@epub = Epub.new
|
11
11
|
|
12
12
|
if ARGV[0]
|
13
13
|
@destination = ARGV[0]
|
@@ -26,12 +26,12 @@ elsif File.exist?('config.yml')
|
|
26
26
|
@config = YAML::load(File.read('config.yml'))
|
27
27
|
@epub_folder = File.join(Dir.getwd, @config[:temp_epub_folder])
|
28
28
|
|
29
|
-
make_skeleton Dir.getwd, @epub_folder
|
29
|
+
@epub.make_skeleton Dir.getwd, @epub_folder, @config[:default_template]
|
30
30
|
|
31
31
|
@book = Book.new @config[:book_title], @config[:author]
|
32
|
-
@book.chapters =
|
32
|
+
@book.chapters = Epub.read_chapters(@config[:chapter_glob])
|
33
33
|
|
34
|
-
write_templates(@book)
|
34
|
+
@epub.write_templates(@book)
|
35
35
|
|
36
36
|
# TODO: use rubyzip or zipruby or something - they all seem to be a PITA compared to unix zip
|
37
37
|
|
data/config_sample.yml
CHANGED
data/epubbery.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{epubbery}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.2.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Jason LaPier"]
|
12
|
-
s.date = %q{2011-06-
|
12
|
+
s.date = %q{2011-06-18}
|
13
13
|
s.default_executable = %q{epubbery}
|
14
14
|
s.description = %q{Generates a template directory that you can use to build a custom epub.
|
15
15
|
After customizing templates, use bin/gen_epub.rb to create and validate an epub archive.}
|
@@ -33,11 +33,11 @@ Gem::Specification.new do |s|
|
|
33
33
|
"epubbery.gemspec",
|
34
34
|
"lib/book.rb",
|
35
35
|
"lib/chapter.rb",
|
36
|
-
"lib/
|
36
|
+
"lib/epub.rb",
|
37
37
|
"lib/epubbery.rb",
|
38
38
|
"spec/book_spec.rb",
|
39
39
|
"spec/chapter_spec.rb",
|
40
|
-
"spec/
|
40
|
+
"spec/epub_spec.rb",
|
41
41
|
"spec/spec_helper.rb",
|
42
42
|
"templates/META-INF/container.xml",
|
43
43
|
"templates/OEBPS/chapter.html.liquid",
|
@@ -74,7 +74,7 @@ Gem::Specification.new do |s|
|
|
74
74
|
s.test_files = [
|
75
75
|
"spec/book_spec.rb",
|
76
76
|
"spec/chapter_spec.rb",
|
77
|
-
"spec/
|
77
|
+
"spec/epub_spec.rb",
|
78
78
|
"spec/spec_helper.rb"
|
79
79
|
]
|
80
80
|
|
@@ -82,6 +82,7 @@ Gem::Specification.new do |s|
|
|
82
82
|
s.specification_version = 3
|
83
83
|
|
84
84
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
85
|
+
s.add_runtime_dependency(%q<rake>, [">= 0"])
|
85
86
|
s.add_runtime_dependency(%q<RedCloth>, [">= 0"])
|
86
87
|
s.add_runtime_dependency(%q<liquid>, [">= 0"])
|
87
88
|
s.add_runtime_dependency(%q<uuid>, [">= 0"])
|
@@ -95,6 +96,7 @@ Gem::Specification.new do |s|
|
|
95
96
|
s.add_runtime_dependency(%q<uuid>, [">= 0"])
|
96
97
|
s.add_runtime_dependency(%q<linguistics>, [">= 0"])
|
97
98
|
else
|
99
|
+
s.add_dependency(%q<rake>, [">= 0"])
|
98
100
|
s.add_dependency(%q<RedCloth>, [">= 0"])
|
99
101
|
s.add_dependency(%q<liquid>, [">= 0"])
|
100
102
|
s.add_dependency(%q<uuid>, [">= 0"])
|
@@ -109,6 +111,7 @@ Gem::Specification.new do |s|
|
|
109
111
|
s.add_dependency(%q<linguistics>, [">= 0"])
|
110
112
|
end
|
111
113
|
else
|
114
|
+
s.add_dependency(%q<rake>, [">= 0"])
|
112
115
|
s.add_dependency(%q<RedCloth>, [">= 0"])
|
113
116
|
s.add_dependency(%q<liquid>, [">= 0"])
|
114
117
|
s.add_dependency(%q<uuid>, [">= 0"])
|
data/lib/chapter.rb
CHANGED
@@ -48,6 +48,10 @@ class Chapter
|
|
48
48
|
meta['name'] || ""
|
49
49
|
end
|
50
50
|
|
51
|
+
def template
|
52
|
+
meta['template'] || nil
|
53
|
+
end
|
54
|
+
|
51
55
|
# if there is a number, give us that written out as words; otherwise give the chapter name
|
52
56
|
def number_or_name
|
53
57
|
number ? "Chapter #{number_as_word}" : name
|
@@ -1,7 +1,28 @@
|
|
1
1
|
# EpubSetup
|
2
2
|
# making directories and moving files and whatnot
|
3
|
-
|
4
|
-
|
3
|
+
class Epub
|
4
|
+
class << self
|
5
|
+
# kind of an orphaned method that just reads in chapters from text files and returns chapter objects
|
6
|
+
def read_chapters(file_glob)
|
7
|
+
file_glob = File.expand_path(file_glob)
|
8
|
+
puts "Reading files: #{file_glob} (#{Dir[file_glob].size} files found)"
|
9
|
+
chapters = []
|
10
|
+
|
11
|
+
Dir[file_glob].each do |txtfile|
|
12
|
+
chapter = nil
|
13
|
+
File.open(txtfile) do |f|
|
14
|
+
chapter = Chapter.new(f.readlines)
|
15
|
+
chapter.file_name = "#{File.basename(txtfile, '.txt')}.html"
|
16
|
+
end
|
17
|
+
chapters << chapter if chapter
|
18
|
+
end
|
19
|
+
|
20
|
+
# returns chapters as an array sorted by name
|
21
|
+
chapters.sort_by { |c| [c.number || 0, c.name || '', c.file_name] }
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def make_skeleton(base_dir, epub_folder, default_template = 'chapter')
|
5
26
|
@epub_folder = epub_folder
|
6
27
|
@source_templates_dir = File.join(base_dir, 'templates')
|
7
28
|
@target_meta_dir = File.join(@epub_folder, 'META-INF')
|
@@ -22,34 +43,20 @@ module EpubSetup
|
|
22
43
|
FileUtils.cp_r File.join(@source_templates_dir, 'OEBPS', 'fonts'), @target_oebps_dir
|
23
44
|
|
24
45
|
# liquid templates for rest of files
|
25
|
-
@
|
46
|
+
@default_liq_template = Liquid::Template.parse(File.read(File.join(@source_templates_dir, 'OEBPS', "#{default_template.gsub(' ', '_')}.html.liquid" )))
|
26
47
|
@content_liq_template = Liquid::Template.parse(File.read(File.join(@source_templates_dir, 'OEBPS', 'content.opf.liquid' )))
|
27
48
|
@title_liq_template = Liquid::Template.parse(File.read(File.join(@source_templates_dir, 'OEBPS', 'title.html.liquid' )))
|
28
49
|
@toc_liq_template = Liquid::Template.parse(File.read(File.join(@source_templates_dir, 'OEBPS', 'toc.ncx.liquid' )))
|
29
50
|
@eob_liq_template = Liquid::Template.parse(File.read(File.join(@source_templates_dir, 'OEBPS', 'end_of_book.html.liquid')))
|
30
51
|
end
|
31
52
|
|
32
|
-
def read_chapters(file_glob)
|
33
|
-
file_glob = File.expand_path(file_glob)
|
34
|
-
puts "Reading files: #{file_glob} (#{Dir[file_glob].size} files found)"
|
35
|
-
chapters = []
|
36
|
-
|
37
|
-
Dir[file_glob].each do |txtfile|
|
38
|
-
chapter = nil
|
39
|
-
File.open(txtfile) do |f|
|
40
|
-
chapter = Chapter.new(f.readlines)
|
41
|
-
chapter.file_name = "#{File.basename(txtfile, '.txt')}.html"
|
42
|
-
end
|
43
|
-
chapters << chapter if chapter
|
44
|
-
end
|
45
|
-
|
46
|
-
# returns chapters as an array sorted by name
|
47
|
-
chapters.sort_by { |c| [c.number || 0, c.name || '', c.file_name] }
|
48
|
-
end
|
49
|
-
|
50
53
|
def write_templates(book)
|
51
54
|
book.chapters.each do |chapter|
|
52
|
-
|
55
|
+
template = @default_liq_template
|
56
|
+
if chapter.template
|
57
|
+
template = Liquid::Template.parse(File.read(File.join(@source_templates_dir, 'OEBPS', "#{chapter.template.gsub(' ', '_')}.html.liquid" )))
|
58
|
+
end
|
59
|
+
html_output = template.render 'chapter' => chapter
|
53
60
|
puts "Writing: #{@epub_folder}/OEBPS/#{chapter.file_name}"
|
54
61
|
File.open(File.join(@target_oebps_dir, chapter.file_name), "w") { |f| f.puts html_output }
|
55
62
|
end
|
data/lib/epubbery.rb
CHANGED
@@ -1,20 +1,22 @@
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
describe EpubSetup do
|
3
|
+
describe Epub do
|
6
4
|
before(:all) do
|
5
|
+
@epub = Epub.new
|
7
6
|
@tmp_epub_folder = "test_epub_folder_safe_to_remove_will_be_deleted"
|
8
7
|
@base_dir = File.expand_path(File.dirname(__FILE__) + "/..")
|
9
8
|
@tmp_text_folder = "test_epub_folder_safe_to_remove_will_be_deleted2"
|
10
9
|
FileUtils.rm_rf File.join(@base_dir, @tmp_text_folder) if File.exists?(File.join(@base_dir, @tmp_text_folder))
|
11
10
|
FileUtils.mkdir File.join(@base_dir, @tmp_text_folder)
|
11
|
+
FileUtils.cp File.join(@base_dir, 'templates', 'OEBPS', "chapter.html.liquid"),
|
12
|
+
File.join(@base_dir, 'templates', 'OEBPS', 'delete_this_alternate.html.liquid')
|
12
13
|
File.open(File.join(@base_dir, @tmp_text_folder, "1.txt"), "w") do |f|
|
13
14
|
f.puts "Chapter: 1\n"
|
14
15
|
f.puts "Blah blah blah.\n"
|
15
16
|
end
|
16
17
|
File.open(File.join(@base_dir, @tmp_text_folder, "2.txt"), "w") do |f|
|
17
18
|
f.puts "Chapter: 2\n"
|
19
|
+
f.puts "Template: delete this alternate\n"
|
18
20
|
f.puts "Bork bork bork.\n"
|
19
21
|
end
|
20
22
|
end
|
@@ -22,10 +24,11 @@ describe EpubSetup do
|
|
22
24
|
after(:all) do
|
23
25
|
FileUtils.rm_rf File.join(@base_dir, @tmp_epub_folder)
|
24
26
|
FileUtils.rm_rf File.join(@base_dir, @tmp_text_folder)
|
27
|
+
FileUtils.rm File.join(@base_dir, 'templates', 'OEBPS', 'delete_this_alternate.html.liquid')
|
25
28
|
end
|
26
29
|
|
27
30
|
it "should make skeleton" do
|
28
|
-
make_skeleton @base_dir, @tmp_epub_folder
|
31
|
+
@epub.make_skeleton @base_dir, @tmp_epub_folder
|
29
32
|
File.exists?(File.join(@tmp_epub_folder, 'META-INF')).should == true
|
30
33
|
File.exists?(File.join(@tmp_epub_folder, 'META-INF', 'container.xml')).should == true
|
31
34
|
File.exists?(File.join(@tmp_epub_folder, 'OEBPS')).should == true
|
@@ -33,17 +36,28 @@ describe EpubSetup do
|
|
33
36
|
end
|
34
37
|
|
35
38
|
it "should read chapters from a glob file description" do
|
36
|
-
chapters = read_chapters("#{File.join(@base_dir, @tmp_text_folder)}/*.txt")
|
39
|
+
chapters = Epub.read_chapters("#{File.join(@base_dir, @tmp_text_folder)}/*.txt")
|
37
40
|
chapters.size.should == 2
|
38
41
|
chapters.first.file_name.should == "1.html"
|
39
42
|
chapters[1].file_name.should == "2.html"
|
40
43
|
end
|
41
44
|
|
42
45
|
it "should write tempates into the epub folder" do
|
43
|
-
make_skeleton @base_dir, @tmp_epub_folder
|
46
|
+
@epub.make_skeleton @base_dir, @tmp_epub_folder
|
47
|
+
book = Book.new "Testy", "Jason", Date.new(2001)
|
48
|
+
book.chapters = Epub.read_chapters("#{File.join(@base_dir, @tmp_text_folder)}/*.txt")
|
49
|
+
@epub.write_templates book
|
50
|
+
File.exists?(File.join(@tmp_epub_folder, 'OEBPS', 'title.html')).should == true
|
51
|
+
File.exists?(File.join(@tmp_epub_folder, 'OEBPS', '1.html')).should == true
|
52
|
+
File.exists?(File.join(@tmp_epub_folder, 'OEBPS', '2.html')).should == true
|
53
|
+
File.exists?(File.join(@tmp_epub_folder, 'OEBPS', 'end_of_book.html')).should == true
|
54
|
+
end
|
55
|
+
|
56
|
+
it "should write tempates into the epub folder" do
|
57
|
+
@epub.make_skeleton @base_dir, @tmp_epub_folder
|
44
58
|
book = Book.new "Testy", "Jason", Date.new(2001)
|
45
|
-
book.chapters = read_chapters("#{File.join(@base_dir, @tmp_text_folder)}/*.txt")
|
46
|
-
write_templates book
|
59
|
+
book.chapters = Epub.read_chapters("#{File.join(@base_dir, @tmp_text_folder)}/*.txt")
|
60
|
+
@epub.write_templates book
|
47
61
|
File.exists?(File.join(@tmp_epub_folder, 'OEBPS', 'title.html')).should == true
|
48
62
|
File.exists?(File.join(@tmp_epub_folder, 'OEBPS', '1.html')).should == true
|
49
63
|
File.exists?(File.join(@tmp_epub_folder, 'OEBPS', '2.html')).should == true
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: epubbery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
- 1
|
9
8
|
- 2
|
10
|
-
|
9
|
+
- 0
|
10
|
+
version: 0.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jason LaPier
|
@@ -15,11 +15,11 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-06-
|
18
|
+
date: 2011-06-18 00:00:00 -07:00
|
19
19
|
default_executable: epubbery
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
-
name:
|
22
|
+
name: rake
|
23
23
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
24
24
|
none: false
|
25
25
|
requirements:
|
@@ -33,7 +33,7 @@ dependencies:
|
|
33
33
|
type: :runtime
|
34
34
|
requirement: *id001
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
|
-
name:
|
36
|
+
name: RedCloth
|
37
37
|
version_requirements: &id002 !ruby/object:Gem::Requirement
|
38
38
|
none: false
|
39
39
|
requirements:
|
@@ -47,7 +47,7 @@ dependencies:
|
|
47
47
|
type: :runtime
|
48
48
|
requirement: *id002
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
|
-
name:
|
50
|
+
name: liquid
|
51
51
|
version_requirements: &id003 !ruby/object:Gem::Requirement
|
52
52
|
none: false
|
53
53
|
requirements:
|
@@ -61,7 +61,7 @@ dependencies:
|
|
61
61
|
type: :runtime
|
62
62
|
requirement: *id003
|
63
63
|
- !ruby/object:Gem::Dependency
|
64
|
-
name:
|
64
|
+
name: uuid
|
65
65
|
version_requirements: &id004 !ruby/object:Gem::Requirement
|
66
66
|
none: false
|
67
67
|
requirements:
|
@@ -75,8 +75,22 @@ dependencies:
|
|
75
75
|
type: :runtime
|
76
76
|
requirement: *id004
|
77
77
|
- !ruby/object:Gem::Dependency
|
78
|
-
name:
|
78
|
+
name: linguistics
|
79
79
|
version_requirements: &id005 !ruby/object:Gem::Requirement
|
80
|
+
none: false
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
hash: 3
|
85
|
+
segments:
|
86
|
+
- 0
|
87
|
+
version: "0"
|
88
|
+
prerelease: false
|
89
|
+
type: :runtime
|
90
|
+
requirement: *id005
|
91
|
+
- !ruby/object:Gem::Dependency
|
92
|
+
name: rspec
|
93
|
+
version_requirements: &id006 !ruby/object:Gem::Requirement
|
80
94
|
none: false
|
81
95
|
requirements:
|
82
96
|
- - ~>
|
@@ -89,10 +103,10 @@ dependencies:
|
|
89
103
|
version: 2.2.0
|
90
104
|
prerelease: false
|
91
105
|
type: :development
|
92
|
-
requirement: *
|
106
|
+
requirement: *id006
|
93
107
|
- !ruby/object:Gem::Dependency
|
94
108
|
name: bundler
|
95
|
-
version_requirements: &
|
109
|
+
version_requirements: &id007 !ruby/object:Gem::Requirement
|
96
110
|
none: false
|
97
111
|
requirements:
|
98
112
|
- - ~>
|
@@ -105,10 +119,10 @@ dependencies:
|
|
105
119
|
version: 1.0.0
|
106
120
|
prerelease: false
|
107
121
|
type: :development
|
108
|
-
requirement: *
|
122
|
+
requirement: *id007
|
109
123
|
- !ruby/object:Gem::Dependency
|
110
124
|
name: jeweler
|
111
|
-
version_requirements: &
|
125
|
+
version_requirements: &id008 !ruby/object:Gem::Requirement
|
112
126
|
none: false
|
113
127
|
requirements:
|
114
128
|
- - ~>
|
@@ -121,10 +135,10 @@ dependencies:
|
|
121
135
|
version: 1.5.1
|
122
136
|
prerelease: false
|
123
137
|
type: :development
|
124
|
-
requirement: *
|
138
|
+
requirement: *id008
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
140
|
name: rcov
|
127
|
-
version_requirements: &
|
141
|
+
version_requirements: &id009 !ruby/object:Gem::Requirement
|
128
142
|
none: false
|
129
143
|
requirements:
|
130
144
|
- - ">="
|
@@ -135,10 +149,10 @@ dependencies:
|
|
135
149
|
version: "0"
|
136
150
|
prerelease: false
|
137
151
|
type: :development
|
138
|
-
requirement: *
|
152
|
+
requirement: *id009
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
name: RedCloth
|
141
|
-
version_requirements: &
|
155
|
+
version_requirements: &id010 !ruby/object:Gem::Requirement
|
142
156
|
none: false
|
143
157
|
requirements:
|
144
158
|
- - ">="
|
@@ -149,10 +163,10 @@ dependencies:
|
|
149
163
|
version: "0"
|
150
164
|
prerelease: false
|
151
165
|
type: :runtime
|
152
|
-
requirement: *
|
166
|
+
requirement: *id010
|
153
167
|
- !ruby/object:Gem::Dependency
|
154
168
|
name: liquid
|
155
|
-
version_requirements: &
|
169
|
+
version_requirements: &id011 !ruby/object:Gem::Requirement
|
156
170
|
none: false
|
157
171
|
requirements:
|
158
172
|
- - ">="
|
@@ -163,10 +177,10 @@ dependencies:
|
|
163
177
|
version: "0"
|
164
178
|
prerelease: false
|
165
179
|
type: :runtime
|
166
|
-
requirement: *
|
180
|
+
requirement: *id011
|
167
181
|
- !ruby/object:Gem::Dependency
|
168
182
|
name: uuid
|
169
|
-
version_requirements: &
|
183
|
+
version_requirements: &id012 !ruby/object:Gem::Requirement
|
170
184
|
none: false
|
171
185
|
requirements:
|
172
186
|
- - ">="
|
@@ -177,10 +191,10 @@ dependencies:
|
|
177
191
|
version: "0"
|
178
192
|
prerelease: false
|
179
193
|
type: :runtime
|
180
|
-
requirement: *
|
194
|
+
requirement: *id012
|
181
195
|
- !ruby/object:Gem::Dependency
|
182
196
|
name: linguistics
|
183
|
-
version_requirements: &
|
197
|
+
version_requirements: &id013 !ruby/object:Gem::Requirement
|
184
198
|
none: false
|
185
199
|
requirements:
|
186
200
|
- - ">="
|
@@ -191,7 +205,7 @@ dependencies:
|
|
191
205
|
version: "0"
|
192
206
|
prerelease: false
|
193
207
|
type: :runtime
|
194
|
-
requirement: *
|
208
|
+
requirement: *id013
|
195
209
|
description: |-
|
196
210
|
Generates a template directory that you can use to build a custom epub.
|
197
211
|
After customizing templates, use bin/gen_epub.rb to create and validate an epub archive.
|
@@ -217,11 +231,11 @@ files:
|
|
217
231
|
- epubbery.gemspec
|
218
232
|
- lib/book.rb
|
219
233
|
- lib/chapter.rb
|
220
|
-
- lib/
|
234
|
+
- lib/epub.rb
|
221
235
|
- lib/epubbery.rb
|
222
236
|
- spec/book_spec.rb
|
223
237
|
- spec/chapter_spec.rb
|
224
|
-
- spec/
|
238
|
+
- spec/epub_spec.rb
|
225
239
|
- spec/spec_helper.rb
|
226
240
|
- templates/META-INF/container.xml
|
227
241
|
- templates/OEBPS/chapter.html.liquid
|
@@ -286,5 +300,5 @@ summary: Generate epub skeleton, convert plain text files into xhtml and create
|
|
286
300
|
test_files:
|
287
301
|
- spec/book_spec.rb
|
288
302
|
- spec/chapter_spec.rb
|
289
|
-
- spec/
|
303
|
+
- spec/epub_spec.rb
|
290
304
|
- spec/spec_helper.rb
|