cheepub 0.6.1 → 0.7.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 758cd850aaf803a9c56b79a5a4d66b468e3ffd5d0ed9432db4572d10c73bd77e
4
- data.tar.gz: 985f263ab458df9f8b32202c742bbef40bcb196545c8e694be1a0a525a890215
3
+ metadata.gz: 2d46005c2a2b8119f4d2a4857af8c580744899c3eadfcacb1266cf4bc6eea597
4
+ data.tar.gz: 1d435ca56cbf866f59dd33fd881ce0239a16be20840bd63326193a03d38847d3
5
5
  SHA512:
6
- metadata.gz: 1f19cb68d8ace724d3f6fbf371e0ea3c7fcc089e0bb73b59c65aabf91e4419d47f9f30fa162bf920732ca3cbe6774ff497e5f183489359aeb584358c560a9882
7
- data.tar.gz: 3f92306d03658ab4360d4cd4b6dfd05e1e7c83304a60b418a1c472dd6cd12592fb189351dce20a6f0318e552b5de6faf949cdccf395bf6ccad97629e05a36523
6
+ metadata.gz: e0d9fdc72911149b535024b7c6031a7015c65d2a6b2264fcf3b8e51a886e144c22facbb7eb425670347693c7844295a2c049dfa2e8038f2624afeacdd4595a53
7
+ data.tar.gz: 0bb2e7d84eb8c7ce37cba962718a21048c6c04e3e4dede3e7de897416c485c463990551a8e54fb94a87ca3819d985bb3990a7db0ae0e2d0086e683901b2cf082
@@ -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
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Cheepub
2
- VERSION = "0.6.1"
2
+ VERSION = "0.7.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cheepub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - takahashim