text_to_epub 0.1.1 → 0.1.2
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/VERSION +1 -1
- data/bin/gen_epub +5 -11
- data/bin/new_book +2 -2
- data/templates/OEBPS/end_of_book.html.liquid +2 -2
- data/templates/OEBPS/title.html.liquid +1 -1
- data/text_to_epub.gemspec +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/bin/gen_epub
CHANGED
@@ -1,18 +1,17 @@
|
|
1
1
|
#!/usr/bin/ruby
|
2
2
|
|
3
|
-
@
|
3
|
+
@gem_dir = File.expand_path(File.dirname(__FILE__) + '/..')
|
4
4
|
|
5
|
-
$: << File.join(@
|
5
|
+
$: << File.join(@gem_dir, 'lib')
|
6
6
|
|
7
|
-
require File.join(@
|
7
|
+
require File.join(@gem_dir, 'lib', 'text_to_epub')
|
8
8
|
|
9
9
|
include EpubSetup
|
10
10
|
|
11
11
|
@config = YAML::load(File.read('config.yml'))
|
12
|
+
@epub_folder = File.join(Dir.getwd, @config[:temp_epub_folder])
|
12
13
|
|
13
|
-
|
14
|
-
|
15
|
-
make_skeleton @base_dir, @epub_folder
|
14
|
+
make_skeleton Dir.getwd, @epub_folder
|
16
15
|
|
17
16
|
@book = Book.new @config[:book_title], @config[:author]
|
18
17
|
@book.chapters = EpubSetup::read_chapters(@config[:chapter_glob])
|
@@ -33,8 +32,3 @@ puts "\nRunning epubcheck..."
|
|
33
32
|
system "java -jar #{@config[:epubcheck]} #{@config[:file_name]}"
|
34
33
|
|
35
34
|
|
36
|
-
puts "\nnext convert to pdf for POD:"
|
37
|
-
puts "\nebook-convert #{@epub_folder}/#{@config[:file_name]} .pdf --custom-size=5x8 --base-font-size=12 --margin-top=54 --margin-left=54 --margin-bottom=54 --margin-right=54"
|
38
|
-
|
39
|
-
puts "\n -- or use wkhtmltopdf:"
|
40
|
-
puts "\nwkhtmltopdf --page-width 5in --page-height 8in -L 0.5in -R 0.5in -B 0.5in -T 0.25in --footer-center '[page]' --footer-spacing 2 --print-media-type --footer-font-name TexGyreTermes --footer-font-size 9 #{@epub_folder}/OEBPS/*.html mybook1.pdf"
|
data/bin/new_book
CHANGED
@@ -18,6 +18,6 @@ puts "Copying necessary files..."
|
|
18
18
|
FileUtils.cp_r File.join(@base_dir, 'templates'), @destination
|
19
19
|
FileUtils.cp_r File.join(@base_dir, 'lib'), @destination
|
20
20
|
FileUtils.cp_r File.join(@base_dir, 'bin'), @destination
|
21
|
-
FileUtils.cp 'config_sample.yml', File.join(@destination, 'config.yml')
|
21
|
+
FileUtils.cp File.join(@base_dir, 'config_sample.yml'), File.join(@destination, 'config.yml')
|
22
22
|
|
23
|
-
puts "Done! Go to #{@destination} and edit config.yml and then run
|
23
|
+
puts "Done! Go to #{@destination} and edit config.yml and then run gen_epub from that directory."
|
@@ -7,7 +7,7 @@
|
|
7
7
|
</head>
|
8
8
|
<body>
|
9
9
|
<div class="smaller">
|
10
|
-
<p>This E-Book was produced by OpenBookFiction.com</p>
|
10
|
+
<p>This E-Book was produced by tools provided by OpenBookFiction.com</p>
|
11
11
|
|
12
12
|
<p>Copyright © {{book.pub_year}} by {{book.author}}</p>
|
13
13
|
|
@@ -26,7 +26,7 @@
|
|
26
26
|
give it away. <em>(wink wink nudge nudge)</em></p>
|
27
27
|
|
28
28
|
<p>If you've received a copy from a friend and you've read this far and you would like to support
|
29
|
-
a struggling author, I would be humbly honored if you would go to
|
29
|
+
a struggling author, I would be humbly honored if you would go to my site
|
30
30
|
and pay for your very own copy of this e-book.</p>
|
31
31
|
</div>
|
32
32
|
</body>
|
data/text_to_epub.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: text_to_epub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jason LaPier
|