link_finder 0.0.2 → 0.0.3

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.
@@ -1,3 +1,3 @@
1
1
  module LinkFinder
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -21,7 +21,6 @@
21
21
  <property name="border_width">14</property>
22
22
  <property name="window_position">center</property>
23
23
  <property name="default_width">700</property>
24
- <property name="default_height">480</property>
25
24
  <signal name="destroy" handler="on_wnd_main_destroy" swapped="no"/>
26
25
  <signal name="delete-event" handler="on_wnd_main_delete_event" swapped="no"/>
27
26
  <child>
@@ -251,32 +250,6 @@
251
250
  <property name="position">2</property>
252
251
  </packing>
253
252
  </child>
254
- <child>
255
- <object class="GtkHSeparator" id="hseparator2">
256
- <property name="height_request">8</property>
257
- <property name="visible">True</property>
258
- <property name="can_focus">False</property>
259
- </object>
260
- <packing>
261
- <property name="expand">False</property>
262
- <property name="fill">True</property>
263
- <property name="padding">4</property>
264
- <property name="position">3</property>
265
- </packing>
266
- </child>
267
- <child>
268
- <object class="GtkImage" id="img_diagram">
269
- <property name="visible">True</property>
270
- <property name="can_focus">False</property>
271
- <property name="stock">gtk-missing-image</property>
272
- </object>
273
- <packing>
274
- <property name="expand">True</property>
275
- <property name="fill">True</property>
276
- <property name="padding">4</property>
277
- <property name="position">4</property>
278
- </packing>
279
- </child>
280
253
  </object>
281
254
  </child>
282
255
  </object>
data/lib/link_finder.rb CHANGED
@@ -5,7 +5,6 @@ require "nokogiri"
5
5
  require "open-uri"
6
6
  require "timeout"
7
7
  require "thread"
8
- require "gruff"
9
8
 
10
9
  module LinkFinder
11
10
  class Finder
@@ -112,11 +111,6 @@ module LinkFinder
112
111
  Gtk::main_iteration_do(blocking = false) while Gtk::events_pending?
113
112
  end
114
113
 
115
- def dia_refresh
116
- pixbuf = Gdk::Pixbuf.new("#{@report_filename}.png", 700, 520)
117
- @img_diagram.pixbuf = pixbuf
118
- Gtk::main_iteration_do(blocking = false) while Gtk::events_pending?
119
- end
120
114
 
121
115
  def start_process
122
116
  @report_filename = "report_#{Time.now.to_s.gsub(/[\s\+]/, "_").gsub(/\:/,'-')}"
@@ -161,21 +155,6 @@ module LinkFinder
161
155
  r.each { |t| @result << t }
162
156
  @progress_value += 1
163
157
  progress_set(@sites.length, @progress_value)
164
-
165
- if @progress_value >= section
166
- section += @sites.length / 100
167
- dia_data = []
168
- @links.each do |l|
169
- c = 0
170
- @result.each { |r| c += 1 if r[:link] == l }
171
- dia_data << {:link => l, :count => c}
172
- end
173
- dia = Gruff::Bar.new
174
- dia.title = "Отчет"
175
- dia_data.each { |d| dia.data(d[:link], d[:count]) }
176
- dia.write("#{@report_filename}.png")
177
- dia_refresh
178
- end
179
158
  end
180
159
  end
181
160
  # break if index >= 10
@@ -221,11 +200,6 @@ module LinkFinder
221
200
  f.write "#{s}\n"
222
201
  end
223
202
  end
224
- dia = Gruff::Bar.new
225
- dia.title = "Отчет"
226
- dia_data.each { |d| dia.data(d[:link], d[:count]) }
227
- dia.write("#{@report_filename}.png")
228
- dia_refresh
229
203
  end
230
204
  end
231
205
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: link_finder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-17 00:00:00.000000000 Z
12
+ date: 2012-11-18 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Искалка ссылок на сайтах
15
15
  email: