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 +4 -4
- data/README.md +5 -0
- data/lib/html2pdf.rb +1 -0
- data/lib/html2pdf/cli.rb +9 -2
- data/lib/html2pdf/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f1558eb0b691dbc0d701b5deb1ef3e6dd34de627
|
|
4
|
+
data.tar.gz: c8c19bd55f2a00b1912b4b60d7a8d7ce5a698be6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f976f3e348cc3b0e08e0544212a6cf5fe143993875a76c8a58b1726645757357a32984324fc489b1e161487cec968fba0a490063809a69ad57dda2ad3c4a7083
|
|
7
|
+
data.tar.gz: d9204c0d1b265740950a242b24075cf4a4e1c4da2fe04d9757a7a6d9bb130a9214c2d6f07eefebd553a0b5765f87893c20037da5567c9ea09f3b88fbce8f5792
|
data/README.md
CHANGED
data/lib/html2pdf.rb
CHANGED
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
|
-
|
|
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:
|
|
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
|
data/lib/html2pdf/version.rb
CHANGED