kristin 0.3.3 → 0.4.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 +2 -0
- data/kristin.gemspec +3 -1
- data/lib/kristin/version.rb +1 -1
- data/lib/kristin.rb +4 -4
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 374bde35e53e7d5305a326698e290453a1372ae5
|
4
|
+
data.tar.gz: aea2399fb1bc0207b2e73ae38b86d97ed922518f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a7400bc756e5ddd789e6005ab6a08197fc85d69c182d35788be10be88c7012ecee1fde64a4d11cff14e27e83eb097b6b6898edac48cb27f83448fb13ac10299
|
7
|
+
data.tar.gz: f87252c8dc9410cb4c44b6e604105d1b10aa97e4f64eeb0c311b54bac2070108dc309904b7f6fbac2aefbe940e6148ce11a75a2f7448c97f46b1321754a69a72
|
data/.travis.yml
CHANGED
data/kristin.gemspec
CHANGED
@@ -17,7 +17,9 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
|
-
|
20
|
+
|
21
|
+
spec.add_dependency "spoon"
|
22
|
+
|
21
23
|
spec.add_development_dependency "bundler"
|
22
24
|
spec.add_development_dependency "rake"
|
23
25
|
spec.add_development_dependency "nokogiri"
|
data/lib/kristin/version.rb
CHANGED
data/lib/kristin.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require "kristin/version"
|
2
2
|
require 'open-uri'
|
3
3
|
require "net/http"
|
4
|
+
require "spoon"
|
4
5
|
|
5
6
|
module Kristin
|
6
7
|
class Converter
|
@@ -13,9 +14,9 @@ module Kristin
|
|
13
14
|
def convert
|
14
15
|
raise IOError, "Can't find pdf2htmlex executable in PATH" if not command_available?
|
15
16
|
src = determine_source(@source)
|
16
|
-
opts = process_options
|
17
|
-
|
18
|
-
pid =
|
17
|
+
opts = process_options.split(" ")
|
18
|
+
args = [pdf2htmlex_command, opts, src, @target].flatten
|
19
|
+
pid = Spoon.spawnp(*args)
|
19
20
|
Process.waitpid(pid)
|
20
21
|
|
21
22
|
## TODO: Grab error message from pdf2htmlex and raise a better error
|
@@ -34,7 +35,6 @@ module Kristin
|
|
34
35
|
opts.push("--zoom #{@options[:zoom]}") if @options[:zoom]
|
35
36
|
opts.push("--fit-width #{@options[:fit_width]}") if @options[:fit_width]
|
36
37
|
opts.push("--fit-height #{@options[:fit_height]}") if @options[:fit_height]
|
37
|
-
|
38
38
|
opts.join(" ")
|
39
39
|
end
|
40
40
|
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kristin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Nyström
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-04-
|
11
|
+
date: 2013-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: spoon
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: bundler
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -110,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
110
124
|
version: '0'
|
111
125
|
requirements: []
|
112
126
|
rubyforge_project:
|
113
|
-
rubygems_version: 2.0.
|
127
|
+
rubygems_version: 2.0.0
|
114
128
|
signing_key:
|
115
129
|
specification_version: 4
|
116
130
|
summary: Convert PDF docs to beautiful HTML files without losing text or format. This
|