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 +4 -4
- data/README.md +9 -1
- data/lib/softcover/builders/pdf.rb +10 -4
- data/lib/softcover/cli.rb +3 -0
- data/lib/softcover/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7026acaeeee742fc0106dc40e1b8363023ca75f6
|
4
|
+
data.tar.gz: 2c91035ab74d0857af71a6f2875cd1ba8769a132
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
-
|
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",
|
data/lib/softcover/version.rb
CHANGED
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.
|
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-
|
12
|
+
date: 2015-03-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: polytexnic
|