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 CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -1,18 +1,17 @@
1
1
  #!/usr/bin/ruby
2
2
 
3
- @base_dir = File.expand_path(File.dirname(__FILE__) + '/..')
3
+ @gem_dir = File.expand_path(File.dirname(__FILE__) + '/..')
4
4
 
5
- $: << File.join(@base_dir, 'lib')
5
+ $: << File.join(@gem_dir, 'lib')
6
6
 
7
- require File.join(@base_dir, 'lib', 'text_to_epub')
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
- @epub_folder = File.join(@base_dir, @config[:temp_epub_folder])
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"
@@ -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 ./bin/gen_epub.rb from that directory."
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 &#169; {{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 the openbookfiction.com site
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>
@@ -8,6 +8,6 @@
8
8
  <body>
9
9
  <h1>{{ title }}</h1>
10
10
  <div><img src="images/made_by_obf.jpg" alt="Title page"/></div>
11
- <p>E-Book Produced by OpenBookFiction.org</p>
11
+ <p>E-Book Produced by tools provided by OpenBookFiction.com</p>
12
12
  </body>
13
13
  </html>
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{text_to_epub}
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
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"]
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: 25
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jason LaPier