html2pdf 0.0.1 → 0.0.2

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
  SHA1:
3
- metadata.gz: 86055351d30cb9e5bd6264f6204ccdddd2bb98f0
4
- data.tar.gz: f23ee237e3db6277ae2f6f69f92d2113be1fc8e3
3
+ metadata.gz: f1558eb0b691dbc0d701b5deb1ef3e6dd34de627
4
+ data.tar.gz: c8c19bd55f2a00b1912b4b60d7a8d7ce5a698be6
5
5
  SHA512:
6
- metadata.gz: 9e4d6713bffc9498dc839303d0a24ded97615d3ea18b4f947e22263ade100c17ee8c999491bc2cf36bbd4cd245933428f1297dc8c4573f94b1a7bc1735f76ee4
7
- data.tar.gz: 53877751901e76b3046b57b1844e2f09a056f4312fb3b55f2c9192f36657d1862a2923352b4c64328f1b70ed3de5c29f5f9f7962076403c18a2cd49ecf7f4ed7
6
+ metadata.gz: f976f3e348cc3b0e08e0544212a6cf5fe143993875a76c8a58b1726645757357a32984324fc489b1e161487cec968fba0a490063809a69ad57dda2ad3c4a7083
7
+ data.tar.gz: d9204c0d1b265740950a242b24075cf4a4e1c4da2fe04d9757a7a6d9bb130a9214c2d6f07eefebd553a0b5765f87893c20037da5567c9ea09f3b88fbce8f5792
data/README.md CHANGED
@@ -92,6 +92,11 @@ the pdf version of it.
92
92
 
93
93
  ### Changelogs
94
94
 
95
+ #### 0.0.2
96
+
97
+ - Use [agile_utils][] to 0.0.5
98
+ - Fix minor error when using --version
99
+
95
100
  #### 0.0.1
96
101
 
97
102
  - Initial release
data/lib/html2pdf.rb CHANGED
@@ -2,5 +2,6 @@ require 'agile_utils'
2
2
  require 'code_lister'
3
3
  require_relative './html2pdf/utils'
4
4
  require_relative './html2pdf/cli'
5
+ require_relative './html2pdf/version'
5
6
  include AgileUtils::Options
6
7
  include CodeLister
data/lib/html2pdf/cli.rb CHANGED
@@ -14,11 +14,18 @@ module Html2Pdf
14
14
  method_option *AgileUtils::Options::VERSION
15
15
 
16
16
  def export
17
+ opts = options.symbolize_keys
18
+
17
19
  unless Html2Pdf::Utils.required_softwares?
18
20
  fail 'You must have valid `wkhtmltopdf` and `ghostscript` installation'
19
21
  end
20
22
 
21
- input_files = CodeLister.files base_dir: options[:base_dir],
23
+ if opts[:version]
24
+ puts "You are using Html2Pdf version #{Html2Pdf::VERSION}"
25
+ exit
26
+ end
27
+
28
+ input_files = CodeLister.files base_dir: opts[:base_dir],
22
29
  exts: %w(html xhtml),
23
30
  recursive: true
24
31
  elapsed = AgileUtils::FileUtil.time do
@@ -35,7 +42,7 @@ Usage:
35
42
 
36
43
  Options:
37
44
  -b, [--base-dir=BASE_DIR] # Base directory
38
- # Default: /Users/agilecreativity/codes/github/html2pdf
45
+ # Default: . (current directory)
39
46
  -n, [--inc-words=one two three] # List of words to be included in the result
40
47
  -x, [--exc-words=one two three] # List of words to be excluded from the result
41
48
  -i, [--ignore-case], [--no-ignore-case] # Match case insensitively
@@ -1,3 +1,3 @@
1
1
  module Html2Pdf
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html2pdf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Burin Choomnuan