FreedomCoder-esearchy 0.1.2.1 → 0.1.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/bin/esearchy +37 -17
  2. data/lib/esearchy.rb +4 -4
  3. metadata +1 -1
data/bin/esearchy CHANGED
@@ -3,6 +3,7 @@
3
3
  require 'rubygems'
4
4
  require 'getoptlong'
5
5
  require 'esearchy'
6
+ ESearchy::LOG.level = ESearchy::APP
6
7
 
7
8
  @yahoo_key = nil
8
9
  @bing_key = nil
@@ -43,8 +44,26 @@ opts.each do |opt, arg|
43
44
  \tWell I guess you know what this is for (To obtain this Help).\n
44
45
  --domain, -d [domain.com]
45
46
  \t The domain name to search.\n
47
+ --disable-google
48
+ \t Disables Google searches.\n
49
+ --disable-yahoo
50
+ \t Disables Yahoo searches.\n
51
+ --disable-bing
52
+ \t Disables Bing searches.\n
53
+ --disable-linkedin
54
+ \t Disables LinkedIn searches.\n
55
+ --disable-gprogiles
56
+ \t Disables Google Profiles searches.\n
57
+ --disable-naymz
58
+ \t Disables Naymz searches.\n
59
+ --disable-ggroups
60
+ \t Disables Google Groups searches.\n
61
+ --disable-pgp
62
+ \t Disables PGP searches.\n
63
+ --disable-usenet
64
+ \t Disables Usenet searches.\n
46
65
  --filter, -p
47
- \t The pattern to use to filter emails.\n
66
+ \t The pattern to use to filter emails.(not fully implemented)\n
48
67
  --file, -f [file_name]
49
68
  \tIf we need to search more than one domain we can provide a list.\n
50
69
  --output, -o
@@ -53,25 +72,25 @@ opts.each do |opt, arg|
53
72
  #END OF HELP
54
73
  exit(0)
55
74
  when '--disable-google':
56
- @no_eng[:google] = false
75
+ @no_eng[:Google] = false
57
76
  when '--disable-yahoo':
58
- @no_eng[:yahoo] = false
77
+ @no_eng[:Yahoo] = false
59
78
  when '--disable-bing':
60
- @no_eng[:bing] = false
79
+ @no_eng[:Bing] = false
61
80
  when '--disable-altavisa':
62
- @no_eng[:altavista] = false
81
+ @no_eng[:Altavista] = false
63
82
  when '--disable-linkedin':
64
- @no_eng[:linkedin] = false
83
+ @no_eng[:LinkedIn] = false
65
84
  when '--disable-gprofiles':
66
- @no_eng[:googleprofiles] = false
85
+ @no_eng[:GoogleProfiles] = false
67
86
  when '--disable-naymz':
68
- @no_eng[:naymz] = false
87
+ @no_eng[:Naymz] = false
69
88
  when '--disable-ggroups':
70
- @no_eng[:googlegroups] = false
89
+ @no_eng[:GoogleGroups] = false
71
90
  when '--disable-pgp':
72
- @no_eng[:pgp] = false
91
+ @no_eng[:PGP] = false
73
92
  when '--disable-usenet':
74
- @no_eng[:usenet] = false
93
+ @no_eng[:Usenet] = false
75
94
  when '--domain':
76
95
  @domains << arg
77
96
  when '--company':
@@ -97,7 +116,7 @@ opts.each do |opt, arg|
97
116
  when '--licredentials':
98
117
  @li_username, @li_password = arg.split(":")
99
118
  when '--maxhits':
100
- @maxhits = arg
119
+ @maxhits = arg.to_i
101
120
  else
102
121
  ESearchy::LOG.puts "Unknown command. Please try again"
103
122
  exit(0)
@@ -105,10 +124,11 @@ opts.each do |opt, arg|
105
124
  end
106
125
 
107
126
  require 'esearchy'
108
- puts "This is just an example tool ESearchy is more and more a piece of code intended to work as a Library and you should create your own little.rb file :)"
109
-
110
- ESearchy::LOG.level = ESearchy::APP
111
-
127
+ puts "DISCLOSURE: This is just an example tool ESearchy is more and more a piece
128
+ of code intended to work as a Library and you should create your own little.rb file :)"
129
+ puts "------------------------------------------------------------------------"
130
+ puts "REMINDER: if you want to use GoogleProfiles, LinkedIn or Naymz, you will
131
+ need to use the --company (-c) <company_name> option"
112
132
  @domains.each_with_index do |domain, idx|
113
133
  ESearchy.create domain do |d|
114
134
  @no_eng.each do |eng,val|
@@ -120,7 +140,7 @@ ESearchy::LOG.level = ESearchy::APP
120
140
  if (@li_username and @li_password)
121
141
  d.linkedin_credentials= [@li_username, @li_password]
122
142
  else
123
- d.linkedin_credentials = ESearchy.bugmenot
143
+ d.linkedin_credentials = ESearchy::BUGMENOT
124
144
  end
125
145
  d.company_name = @company[idx] unless @company.empty?
126
146
  d.search
data/lib/esearchy.rb CHANGED
@@ -30,10 +30,10 @@ class ESearchy
30
30
  def log_file=(value)
31
31
  ESearchy::LOG.file = value
32
32
  end
33
-
34
- def delay=(value)
35
- ESearch::DELAY = value
36
- end
33
+ # Need to find another way of fixing this.
34
+ #def delay=(value)
35
+ # ESearch::DELAY = value
36
+ #end
37
37
 
38
38
  def initialize(options={}, &block)
39
39
  @query = options[:query]
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.1.2.1
4
+ version: 0.1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matias P. Brutti