cheepub 0.6.1 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +0 -9
- data/README.md +6 -0
- data/lib/cheepub/cli.rb +2 -0
- data/lib/cheepub/generator/latex.rb +4 -1
- data/lib/cheepub/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d46005c2a2b8119f4d2a4857af8c580744899c3eadfcacb1266cf4bc6eea597
|
4
|
+
data.tar.gz: 1d435ca56cbf866f59dd33fd881ce0239a16be20840bd63326193a03d38847d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0d9fdc72911149b535024b7c6031a7015c65d2a6b2264fcf3b8e51a886e144c22facbb7eb425670347693c7844295a2c049dfa2e8038f2624afeacdd4595a53
|
7
|
+
data.tar.gz: 0bb2e7d84eb8c7ce37cba962718a21048c6c04e3e4dede3e7de897416c485c463990551a8e54fb94a87ca3819d985bb3990a7db0ae0e2d0086e683901b2cf082
|
data/.travis.yml
CHANGED
@@ -1,19 +1,10 @@
|
|
1
1
|
sudo: false
|
2
2
|
language: ruby
|
3
|
-
env:
|
4
|
-
global:
|
5
|
-
- CC_TEST_REPORTER_ID=d5331ce7fbbeb2ce680091143c984430e93910cf81cdb09cf6e60baeb2548c05
|
6
3
|
rvm:
|
7
4
|
- 2.4.1
|
8
5
|
- 2.5.1
|
9
|
-
before_script:
|
10
|
-
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
11
|
-
- chmod +x ./cc-test-reporter
|
12
|
-
- ./cc-test-reporter before-build
|
13
6
|
before_install:
|
14
7
|
- gem install bundler -v 1.16.1
|
15
|
-
after_script:
|
16
|
-
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|
17
8
|
branches:
|
18
9
|
only:
|
19
10
|
- master
|
data/README.md
CHANGED
@@ -38,6 +38,7 @@ $ cheepub source.md
|
|
38
38
|
* `--title TITLE` set title of the book
|
39
39
|
* `--config CONFIG` set configuration file
|
40
40
|
* `--latex` (experimental) generate PDF (with LaTeX) file
|
41
|
+
* `--debug` set debug mode
|
41
42
|
* `-o, --out OUTFILE` set output filename
|
42
43
|
* `--[no-]titlepage` add titlepage or not
|
43
44
|
* `-h, --help` print help
|
@@ -87,6 +88,11 @@ In a little district west of Washington Square the streets have run crazy and br
|
|
87
88
|
|
88
89
|
## History
|
89
90
|
|
91
|
+
### 0.7.0
|
92
|
+
|
93
|
+
- support option `--debug`
|
94
|
+
- support `documentClass` for LaTeX in frontmatter
|
95
|
+
|
90
96
|
### 0.6.0
|
91
97
|
|
92
98
|
- (experimental) generate PDF file with LaTeX
|
data/lib/cheepub/cli.rb
CHANGED
@@ -10,6 +10,7 @@ module Cheepub
|
|
10
10
|
option ["--title"], "TITLE", "set title of the book"
|
11
11
|
option ["--config"], "CONFIG", "set configuration file"
|
12
12
|
option ["--latex"], :flag, "generate PDF with LaTeX"
|
13
|
+
option ["--debug"], :flag, "set debug mode"
|
13
14
|
option ["-o", "--output"], "EPUBFILE", "set output filename", attribute_name: :output
|
14
15
|
option ["--[no-]titlepage"], :flag, "add titlepage (or not)"
|
15
16
|
|
@@ -24,6 +25,7 @@ module Cheepub
|
|
24
25
|
params[:title] = title
|
25
26
|
params[:output] = output
|
26
27
|
params[:titlepage] = titlepage?
|
28
|
+
params[:debug] = debug?
|
27
29
|
if latex?
|
28
30
|
gen = Cheepub::Generator::Latex.new(src, params)
|
29
31
|
else
|
@@ -15,7 +15,7 @@ module Cheepub
|
|
15
15
|
|
16
16
|
def output_file(params)
|
17
17
|
outfile = params[:outfile] || "book.pdf"
|
18
|
-
@maker.generate_pdf(outfile)
|
18
|
+
@maker.generate_pdf(outfile, debug: params[:debug])
|
19
19
|
end
|
20
20
|
|
21
21
|
def add_creator(name, role = "aut")
|
@@ -31,6 +31,9 @@ module Cheepub
|
|
31
31
|
@maker.date= params[:date] || Time.now
|
32
32
|
@maker.lastmodified = params[:lastModified] || Time.now
|
33
33
|
@maker.page_progression_direction = params[:pageDirection]
|
34
|
+
if params[:documentClass]
|
35
|
+
@maker.document_class = params[:documentClass]
|
36
|
+
end
|
34
37
|
@content.each_content_with_filename("tex") do |content, filename|
|
35
38
|
@maker.add_item(filename, content)
|
36
39
|
end
|
data/lib/cheepub/version.rb
CHANGED