FreedomCoder-esearchy 0.0.13 → 0.0.14

Sign up to get free protection for your applications and to get access to all the features.
data/lib/esearchy.rb CHANGED
@@ -73,7 +73,7 @@ class ESearchy
73
73
  end
74
74
  alias_method :linkedin_credentials=, :linkedin_credentials
75
75
 
76
- def company_name (company)
76
+ def company_name(company)
77
77
  @engines['LinkedIn'].company_name = company
78
78
  end
79
79
  alias_method :company_name=, :company_name
data/lib/esearchy/bing.rb CHANGED
@@ -62,7 +62,7 @@ class Bing
62
62
  case result["Url"]
63
63
  when /.pdf$/i
64
64
  @r_pdfs << result["Url"]
65
- when /.docx$|.xlsx$|.pptx$/i
65
+ when /.docx$|.xlsx$|.pptx$|.odt$|.odp$|.ods$|.odb$/i
66
66
  @r_officexs << result["Url"]
67
67
  when /.doc$/i
68
68
  @r_docs << result["Url"]
@@ -63,7 +63,7 @@ class Google
63
63
  case result[1]
64
64
  when /.doc$/i
65
65
  @r_docs << result[1]
66
- when /.docx$|.xlsx$|.pptx$/i
66
+ when /.docx$|.xlsx$|.pptx$|.odt$|.odp$|.ods$|.odb$/i
67
67
  @r_officexs << result[1]
68
68
  end
69
69
  when nil
@@ -72,7 +72,7 @@ class Google
72
72
  @r_pdfs << result[2]
73
73
  when /.doc$/i
74
74
  @r_docs << result[2]
75
- when /.docx$|.xlsx$|.pptx$/i
75
+ when /.docx$|.xlsx$|.pptx$|.odt$|.odp$|.ods$|.odb$/i
76
76
  @r_officexs << result[2]
77
77
  when /.txt$|.rtf$|ans$/i
78
78
  @r_txts << result[2]
@@ -102,10 +102,11 @@ module Searchy
102
102
  word.activedocument.close( false )
103
103
  word.quit
104
104
  rescue
105
- if File.exists?("C:\\Program Files\\...\antiword.exe")
106
- search_emails(`antiword "#{name}" -f -s`)
105
+ if File.exists?("C:\\antiword\\antiword.exe")
106
+ search_emails(`C:\\antiword\\antiword.exe "#{name}" -f -s`)
107
107
  else
108
- ESearchy::LOG.puts "Something went wrong parsing the .doc}\n"
108
+ ESearchy::LOG.puts "You need to install either Microsoft Word or Antiword
109
+ to parse .docs"
109
110
  end
110
111
  end
111
112
  elsif RUBY_PLATFORM =~ /linux|darwin/
@@ -114,6 +115,8 @@ module Searchy
114
115
  File.exists?("/usr/local/bin/antiword") or
115
116
  File.exists?("/opt/local/bin/antiword")
116
117
  search_emails(`antiword "#{name}" -f -s`)
118
+ else
119
+ ESearchy::LOG.puts "You need to install Antiword to parse .docs"
117
120
  end
118
121
  rescue
119
122
  ESearchy::LOG.puts "Something went wrong parsing the .doc\n"
@@ -142,7 +145,8 @@ module Searchy
142
145
  while urls.size >= 1
143
146
  @threads << Thread.new do
144
147
  web = URI.parse(urls.pop)
145
- format = web.scan(/docx|xlsx|pptx/i)[0]
148
+ #format = web.scan(/docx|xlsx|pptx/i)[0]
149
+ format = web.scan(/docx|xlsx|pptx|odt|odp|ods|odb/i)[0]
146
150
  ESearchy::LOG.puts "Searching in #{format.upcase}: #{web.to_s}\n"
147
151
  begin
148
152
  http = Net::HTTP.new(web.host,80)
@@ -59,7 +59,7 @@ class Yahoo
59
59
  case result["url"]
60
60
  when /.pdf$/i
61
61
  @r_pdfs << result["url"]
62
- when /.docx$|.xlsx$|.pptx$/i
62
+ when /.docx$|.xlsx$|.pptx$|.odt$|.odp$|.ods$|.odb$/i
63
63
  @r_officexs << result["url"]
64
64
  when /.doc$/i
65
65
  @r_docs << result["url"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: FreedomCoder-esearchy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matias P. Brutti