chupa-text-decomposer-webkit 1.0.5 → 1.0.6
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/bin/chupa-text-decomposer-webkit-screenshoter +40 -0
- data/chupa-text-decomposer-webkit.gemspec +4 -1
- data/doc/text/news.md +6 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23005ea77de47f555ee9de5ea6ef2cf35b7bd120
|
4
|
+
data.tar.gz: 99fc4caa788124db213e933822b4c0d0c09b5532
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 710ed2968e970408454999afb239c730fbd6da5bfc74bfa125a3451126f07bf3aef6609ea634241aa9f9bc32574cf6a1938acd37f9bab5a8119b121e894ec7ff
|
7
|
+
data.tar.gz: 2a427a34b2cf50f9b9da6a10d7aedd636fe8693bd474f0bc08b39d1563a2070e3317cb3d6db209ed0de4aa07b51b765ab3b9528a5e29dd30b5e41f3a92c50a12
|
@@ -0,0 +1,40 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# Copyright (C) 2017 Kouhei Sutou <kou@clear-code.com>
|
4
|
+
#
|
5
|
+
# This library is free software; you can redistribute it and/or
|
6
|
+
# modify it under the terms of the GNU Lesser General Public
|
7
|
+
# License as published by the Free Software Foundation; either
|
8
|
+
# version 2.1 of the License, or (at your option) any later version.
|
9
|
+
#
|
10
|
+
# This library is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
# Lesser General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Lesser General Public
|
16
|
+
# License along with this library; if not, write to the Free Software
|
17
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
|
+
|
19
|
+
require "chupa-text-decomposer-webkit/screenshoter"
|
20
|
+
|
21
|
+
logger = Object.new
|
22
|
+
def logger.debug
|
23
|
+
$stdout.puts("debug: #{yield}")
|
24
|
+
$stdout.flush
|
25
|
+
end
|
26
|
+
|
27
|
+
def logger.error
|
28
|
+
$stdout.puts("error: #{yield}")
|
29
|
+
$stdout.flush
|
30
|
+
end
|
31
|
+
|
32
|
+
path, uri, output_path, width, height = ARGV
|
33
|
+
screenshoter = ChupaTextDecomposerWebKit::Screenshoter.new(logger)
|
34
|
+
File.open(path) do |input|
|
35
|
+
screenshoter.run(input.read,
|
36
|
+
uri,
|
37
|
+
output_path,
|
38
|
+
Integer(width),
|
39
|
+
Integer(height))
|
40
|
+
end
|
@@ -22,7 +22,7 @@ end
|
|
22
22
|
|
23
23
|
Gem::Specification.new do |spec|
|
24
24
|
spec.name = "chupa-text-decomposer-webkit"
|
25
|
-
spec.version = "1.0.
|
25
|
+
spec.version = "1.0.6"
|
26
26
|
spec.homepage = "https://github.com/ranguba/chupa-text-decomposer-webkit"
|
27
27
|
spec.authors = ["Kouhei Sutou"]
|
28
28
|
spec.email = ["kou@clear-code.com"]
|
@@ -38,6 +38,9 @@ Gem::Specification.new do |spec|
|
|
38
38
|
spec.files += Dir.glob("lib/**/*.rb")
|
39
39
|
spec.files += Dir.glob("doc/text/*")
|
40
40
|
spec.files += Dir.glob("test/**/*")
|
41
|
+
Dir.chdir("bin") do
|
42
|
+
spec.executables = Dir.glob("*")
|
43
|
+
end
|
41
44
|
|
42
45
|
spec.add_runtime_dependency("chupa-text", ">= 1.0.7")
|
43
46
|
spec.add_runtime_dependency("webkit2-gtk", ">= 3.1.7")
|
data/doc/text/news.md
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chupa-text-decomposer-webkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
@@ -115,7 +115,8 @@ description: |
|
|
115
115
|
You can use `webkit` decomposer.
|
116
116
|
email:
|
117
117
|
- kou@clear-code.com
|
118
|
-
executables:
|
118
|
+
executables:
|
119
|
+
- chupa-text-decomposer-webkit-screenshoter
|
119
120
|
extensions: []
|
120
121
|
extra_rdoc_files: []
|
121
122
|
files:
|
@@ -124,6 +125,7 @@ files:
|
|
124
125
|
- LICENSE.txt
|
125
126
|
- README.md
|
126
127
|
- Rakefile
|
128
|
+
- bin/chupa-text-decomposer-webkit-screenshoter
|
127
129
|
- chupa-text-decomposer-webkit.gemspec
|
128
130
|
- doc/text/news.md
|
129
131
|
- lib/chupa-text-decomposer-webkit/screenshoter.rb
|