softcover 1.0.2 → 1.0.3

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: 255b5cfa0a6625dc9350b9208b1dfd56d26ee59d
4
- data.tar.gz: c49339cb5622c1b3f75e932c33b410b6d018aea3
3
+ metadata.gz: 7026acaeeee742fc0106dc40e1b8363023ca75f6
4
+ data.tar.gz: 2c91035ab74d0857af71a6f2875cd1ba8769a132
5
5
  SHA512:
6
- metadata.gz: 372a9db988acd7825e0b55a201d073372d11f76614adc8322c635f2b1d49f8d95d43310beff68118032b38b6217999f14e99c922e36d0d355e3efc01c51a6953
7
- data.tar.gz: 600853585001e1e8150732932a3040ce81d4a071c1714900180d8cf7efac10b236072f17a08539268d4bdb9071a1c181a2cf4327605a2a868afc11ddbe24d871
6
+ metadata.gz: c38f05cf9d58ac7422326eecd21a3d86d7c4ca212e0012f8abbf6405222564c9b41fa1e3758220452e78b534c36a69421d799f96a03b5f0bb593660d39cc1caf
7
+ data.tar.gz: 2db0085641ff42ab27d86e60333e58b7a8237649f4e9ad0f247742c9306f7b3849569022f3b2684febe452ca8ac7802f5722a3132a5837fbd29732097b8edbc3
data/README.md CHANGED
@@ -8,7 +8,7 @@ For more details about Softcover, see [*The Softcover Book*](http://manual.softc
8
8
 
9
9
  ## Installation
10
10
 
11
- $ gem install softcover --pre
11
+ $ gem install softcover
12
12
 
13
13
  ## Usage
14
14
 
@@ -25,3 +25,11 @@ for a list of supported commands.
25
25
  3. Commit your changes (`git commit -am 'Add some feature'`)
26
26
  4. Push to the branch (`git push origin my-new-feature`)
27
27
  5. Create new Pull Request
28
+
29
+ ### Local Development
30
+
31
+ 1. Check out the fork
32
+ 2. Add new feature
33
+ 3. Install it locally with `bundle exec rake install`
34
+
35
+ Once your changes are implemented, please update the documentation in the [Softcover manual](https://github.com/softcover/softcover_book) and make another pull request there.
@@ -94,13 +94,19 @@ module Softcover
94
94
  # Returns the command to build the PDF (once).
95
95
  def build_pdf(book_filename, options={})
96
96
  tmp_filename = Softcover::Utils.tmpify(manifest, book_filename)
97
- "#{xelatex} #{tmp_filename} #{options[:filters]}"
97
+ if options[:nonstop] || options[:silent] || options[:quiet]
98
+ # Use nonstop to prevent LaTeX from hanging in quiet/silent mode.
99
+ nonstop = "--interaction=nonstopmode"
100
+ "#{xelatex} #{nonstop} #{tmp_filename} #{options[:filters]}"
101
+ else
102
+ "#{xelatex} #{tmp_filename} #{options[:filters]}"
103
+ end
98
104
  end
99
105
 
100
106
  # Returns the full command to build the PDF.
101
107
  def pdf_cmd(book_filename, options={})
102
108
  if options[:once]
103
- build_pdf(book_filename)
109
+ build_pdf(book_filename, options)
104
110
  elsif options[:'find-overfull']
105
111
  # The way we do things, code listings show up as "Overfull", but
106
112
  # they're actually fine, so filter them out.
@@ -115,7 +121,7 @@ module Softcover
115
121
  filters: "| #{filter_out_listings} | #{show_context}" )
116
122
  else
117
123
  # Run the command twice (to guarantee up-to-date cross-references).
118
- cmd = build_pdf(book_filename)
124
+ cmd = build_pdf(book_filename, options)
119
125
  "#{cmd} ; #{cmd}"
120
126
  end
121
127
  end
@@ -151,4 +157,4 @@ module Softcover
151
157
  end
152
158
  end
153
159
  end
154
- end
160
+ end
data/lib/softcover/cli.rb CHANGED
@@ -41,6 +41,9 @@ module Softcover
41
41
  method_option :'find-overfull', aliases: '-f',
42
42
  desc: "Find overfull hboxes",
43
43
  type: :boolean
44
+ method_option :nonstop, aliases: '-n',
45
+ desc: "Run PDF generator in nonstopmode",
46
+ type: :boolean
44
47
  elsif format == 'mobi'
45
48
  method_option :kindlegen, aliases: '-k',
46
49
  desc: "Use KindleGen to build the MOBI",
@@ -1,3 +1,3 @@
1
1
  module Softcover
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: softcover
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Hartl
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-02-11 00:00:00.000000000 Z
12
+ date: 2015-03-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: polytexnic