pdf-extract 0.0.10 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,155 +1,110 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: pdf-extract
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 0
8
- - 10
9
- version: 0.0.10
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - Karl Jonathan Ward
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2011-12-28 00:00:00 +00:00
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2012-04-16 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: pdf-reader
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &70168030043520 !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
26
- - - ~>
27
- - !ruby/object:Gem::Version
28
- segments:
29
- - 1
30
- - 0
31
- - 0
32
- - rc1
33
- version: 1.0.0.rc1
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: 1.1.0
34
22
  type: :runtime
35
- version_requirements: *id001
36
- - !ruby/object:Gem::Dependency
37
- name: nokogiri
38
23
  prerelease: false
39
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *70168030043520
25
+ - !ruby/object:Gem::Dependency
26
+ name: nokogiri
27
+ requirement: &70168030042660 !ruby/object:Gem::Requirement
40
28
  none: false
41
- requirements:
42
- - - ">="
43
- - !ruby/object:Gem::Version
44
- segments:
45
- - 1
46
- - 5
47
- - 0
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
48
32
  version: 1.5.0
49
33
  type: :runtime
50
- version_requirements: *id002
51
- - !ruby/object:Gem::Dependency
52
- name: rmagick
53
34
  prerelease: false
54
- requirement: &id003 !ruby/object:Gem::Requirement
55
- none: false
56
- requirements:
57
- - - ">="
58
- - !ruby/object:Gem::Version
59
- segments:
60
- - 2
61
- - 13
62
- - 1
63
- version: 2.13.1
64
- type: :runtime
65
- version_requirements: *id003
66
- - !ruby/object:Gem::Dependency
35
+ version_requirements: *70168030042660
36
+ - !ruby/object:Gem::Dependency
67
37
  name: prawn
68
- prerelease: false
69
- requirement: &id004 !ruby/object:Gem::Requirement
38
+ requirement: &70168030041940 !ruby/object:Gem::Requirement
70
39
  none: false
71
- requirements:
72
- - - ">="
73
- - !ruby/object:Gem::Version
74
- segments:
75
- - 0
76
- - 11
77
- - 1
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
78
43
  version: 0.11.1
79
44
  type: :runtime
80
- version_requirements: *id004
81
- - !ruby/object:Gem::Dependency
82
- name: sqlite3
83
45
  prerelease: false
84
- requirement: &id005 !ruby/object:Gem::Requirement
46
+ version_requirements: *70168030041940
47
+ - !ruby/object:Gem::Dependency
48
+ name: sqlite3
49
+ requirement: &70168030041260 !ruby/object:Gem::Requirement
85
50
  none: false
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- segments:
90
- - 1
91
- - 3
92
- - 4
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
93
54
  version: 1.3.4
94
55
  type: :runtime
95
- version_requirements: *id005
96
- - !ruby/object:Gem::Dependency
97
- name: commander
98
56
  prerelease: false
99
- requirement: &id006 !ruby/object:Gem::Requirement
57
+ version_requirements: *70168030041260
58
+ - !ruby/object:Gem::Dependency
59
+ name: commander
60
+ requirement: &70168030040600 !ruby/object:Gem::Requirement
100
61
  none: false
101
- requirements:
102
- - - ">="
103
- - !ruby/object:Gem::Version
104
- segments:
105
- - 4
106
- - 0
107
- - 4
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
108
65
  version: 4.0.4
109
66
  type: :runtime
110
- version_requirements: *id006
111
- - !ruby/object:Gem::Dependency
112
- name: json
113
67
  prerelease: false
114
- requirement: &id007 !ruby/object:Gem::Requirement
68
+ version_requirements: *70168030040600
69
+ - !ruby/object:Gem::Dependency
70
+ name: json
71
+ requirement: &70168030040000 !ruby/object:Gem::Requirement
115
72
  none: false
116
- requirements:
117
- - - ">="
118
- - !ruby/object:Gem::Version
119
- segments:
120
- - 1
121
- - 5
122
- - 1
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
123
76
  version: 1.5.1
124
77
  type: :runtime
125
- version_requirements: *id007
126
- - !ruby/object:Gem::Dependency
127
- name: libsvm-ruby-swig
128
78
  prerelease: false
129
- requirement: &id008 !ruby/object:Gem::Requirement
79
+ version_requirements: *70168030040000
80
+ - !ruby/object:Gem::Dependency
81
+ name: libsvm-ruby-swig
82
+ requirement: &70168030039440 !ruby/object:Gem::Requirement
130
83
  none: false
131
- requirements:
132
- - - ">="
133
- - !ruby/object:Gem::Version
134
- segments:
135
- - 0
136
- - 4
137
- - 0
84
+ requirements:
85
+ - - ! '>='
86
+ - !ruby/object:Gem::Version
138
87
  version: 0.4.0
139
88
  type: :runtime
140
- version_requirements: *id008
89
+ prerelease: false
90
+ version_requirements: *70168030039440
141
91
  description:
142
- email:
92
+ email:
143
93
  - kward@crossref.org
144
- executables:
94
+ executables:
145
95
  - pdf-extract
146
96
  extensions: []
147
-
148
97
  extra_rdoc_files: []
149
-
150
- files:
98
+ files:
99
+ - bin/8630-31489-1-PB.mask.pdf
151
100
  - bin/assign.rb
152
101
  - bin/pdf-extract
102
+ - bin/test2.mask.pdf
103
+ - bin/test3.mask.pdf
104
+ - bin/test4.mask.pdf
105
+ - bin/test5.mask.pdf
106
+ - bin/test6.mask.pdf
107
+ - bin/tmp.txt
153
108
  - bin/train.rb
154
109
  - lib/analysis/columns.rb
155
110
  - lib/analysis/margins.rb
@@ -173,44 +128,32 @@ files:
173
128
  - lib/spatial.rb
174
129
  - lib/view/abstract_view.rb
175
130
  - lib/view/pdf_view.rb
176
- - lib/view/png_view.rb
177
131
  - lib/view/xml_view.rb
178
132
  - data/familynames.db
179
133
  - data/reference.model
180
134
  - data/stopwords.txt
181
- has_rdoc: true
182
135
  homepage: http://github.com/CrossRef/pdfextract
183
136
  licenses: []
184
-
185
137
  post_install_message:
186
138
  rdoc_options: []
187
-
188
- require_paths:
139
+ require_paths:
189
140
  - lib
190
- required_ruby_version: !ruby/object:Gem::Requirement
141
+ required_ruby_version: !ruby/object:Gem::Requirement
191
142
  none: false
192
- requirements:
193
- - - ">="
194
- - !ruby/object:Gem::Version
195
- segments:
196
- - 1
197
- - 9
198
- - 1
143
+ requirements:
144
+ - - ! '>='
145
+ - !ruby/object:Gem::Version
199
146
  version: 1.9.1
200
- required_rubygems_version: !ruby/object:Gem::Requirement
147
+ required_rubygems_version: !ruby/object:Gem::Requirement
201
148
  none: false
202
- requirements:
203
- - - ">="
204
- - !ruby/object:Gem::Version
205
- segments:
206
- - 0
207
- version: "0"
149
+ requirements:
150
+ - - ! '>='
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
208
153
  requirements: []
209
-
210
154
  rubyforge_project:
211
- rubygems_version: 1.3.7
155
+ rubygems_version: 1.8.11
212
156
  signing_key:
213
157
  specification_version: 3
214
158
  summary: PDF content extraction tool and library.
215
159
  test_files: []
216
-
@@ -1,30 +0,0 @@
1
- require 'RMagick'
2
-
3
- require_relative 'abstract_view'
4
-
5
- module PdfExtract
6
- class PngView < AbstractView
7
-
8
- def render options={}
9
- img = Magick::Image.new(800, 1000) { self.background_color = "white" }
10
-
11
- objects.each_pair do |type, objs|
12
- color = auto_color
13
- objs.each do |obj|
14
- gc = Magick::Draw.new
15
- gc.fill = "\##{color}"
16
- gc.rectangle(obj[:x], obj[:y], obj[:x] + obj[:width],
17
- obj[:y] + obj[:height])
18
- gc.draw img
19
- end
20
- end
21
-
22
- img
23
- end
24
-
25
- def self.write render, filename
26
- render.write filename
27
- end
28
-
29
- end
30
- end