-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdumpsuspects.rb
More file actions
executable file
·31 lines (27 loc) · 890 Bytes
/
dumpsuspects.rb
File metadata and controls
executable file
·31 lines (27 loc) · 890 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env ruby
load "./lib/shared.rb"
load "./lib/jsondb.rb"
def isarealname (x)
if x["member"]["name"] == x["answers"][0]
then
isreal = true
else if x["answers"][0].empty?
then
isreal = true
else #puts x["answers"][0].to_json
puts JSON.pretty_generate(x['member']['member_id'].to_s => { 'MeetupName' => x['member']['name'].to_s, 'Member_ID' => x['member']['member_id'].to_s, 'RealName' => x['answers'][0].to_s })
end
return isreal
end
end
$attendees.each { |x|
k = x['member']['member_id'].to_s
if $memberhash.has_key?(k)
then if $memberhash[k]['Status'] == 'Suspect'
then puts $memberhash[k]['MeetupName'].to_s + "\t\t\t " + $memberhash[k]['Member_ID'].to_s + "\t " + "Name:___________________________________________".to_s
end
end
}
#File.open(datafile, 'w') do |file|
#file.write JSON.pretty_generate($memberhash)
#end