my_ebook_pub 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6a06eb3ff127fd4efffdf46678175c82186e2068
4
- data.tar.gz: 684132c3a4ced2b5463babc3f075f78f98e0d793
3
+ metadata.gz: 5ac2253b998ce3f1dd5027af84a44a4df94fc28c
4
+ data.tar.gz: 60505b771b02f4cf4aad80c53904001a77456386
5
5
  SHA512:
6
- metadata.gz: 35c2acef8ac97e6858293e805e0d8fc7cd458512056909271689ce2d9264f99078ea1605155590884630d69bdc1da455848b722fac2546f78fb13a1e9b5c64af
7
- data.tar.gz: 14fe780e1786fdabdad85fc9033e4340be7a7934baff9aac4b1b0d3b26bbad4753ed1552c79387c95d5ef2046481a988863d1b2ab6dca95f2a185ce290316199
6
+ metadata.gz: 516abea23d2533dabbe5251df47c5d3e61a168123a6890662c55838fe9bb50c0ad371eaf89006eac87a608476859b09eb86af85938464c1b4246eddedf6e7161
7
+ data.tar.gz: ecfa6af2181ecff73b043405618303c85153540db57ab47c3af06f648dcfab2559ea8b4f8a8a7b938a70f6af6148934458a24a0bf61625837d583b9017c5d359
@@ -18,6 +18,9 @@
18
18
  h1 {
19
19
  page-break-before: always;
20
20
  }
21
+ h2 {
22
+ page-break-after: avoid;
23
+ }
21
24
  pre {
22
25
  white-space: pre;
23
26
  white-space: pre-wrap;
data/bin/pub CHANGED
@@ -25,10 +25,10 @@ when 'new'
25
25
  STDOUT.puts Dir.glob('**/*')
26
26
  STDOUT.puts 'Your project is ready for content!'
27
27
  when 'generate', 'gen'
28
- STDOUT.puts 'Generating PDF to output directory...'
28
+ STDOUT.puts 'Generating your draft to the output directory...'
29
29
  require 'my_ebook_pub'
30
30
  MyEbookPub.generate parse_options
31
- STDOUT.puts "Your file is ready. See ./output/render.#{parse_options}"
31
+ STDOUT.puts "Your file is ready. See ./output/draft.#{parse_options}"
32
32
  else
33
33
  STDOUT.puts <<-EOF
34
34
  Usage:
data/lib/my_ebook_pub.rb CHANGED
@@ -108,9 +108,13 @@ HERE
108
108
  @location = 'content'
109
109
  @content = cover + preface + toc + content
110
110
  html = ERB.new(@template).result(binding)
111
- product_name = 'render'
111
+ product_name = 'draft'
112
112
 
113
113
  case file_type
114
+ when 'html'
115
+ File.open("output/#{product_name}.html", 'w+') do |file|
116
+ file.write(html)
117
+ end
114
118
  when 'pdf'
115
119
  File.open("output/#{product_name}.pdf", 'w+') do |file|
116
120
  file.write(Docverter::Conversion.run do |c|
@@ -1,3 +1,3 @@
1
1
  module MyEbookPub
2
- VERSION = '0.2.1'
2
+ VERSION = '0.3.0'
3
3
  end
data/my_ebook_pub.gemspec CHANGED
@@ -14,7 +14,6 @@ Gem::Specification.new do |spec|
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
17
- #spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
17
  spec.executables = ["pub"]
19
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
19
  spec.require_paths = ["lib"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: my_ebook_pub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Haeffner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-02 00:00:00.000000000 Z
11
+ date: 2016-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler