Created
November 20, 2014 16:50
-
-
Save jsl/6307960c0cbcd5e01b9e to your computer and use it in GitHub Desktop.
Script for gathering data from Meetup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rmeetup' | |
require 'chronic' | |
puts "Must define meetup url name as ARGV[0]!" if ARGV[0].nil? | |
CLIENT = RMeetup::Client.new do |config| | |
config.api_key = "XXXXXXXXX" | |
end | |
events = CLIENT.fetch(:events, { group_urlname: ARGV[0], status: 'past'}) | |
puts ['Date', 'Yes RSVP Count', 'Event URL', 'Name', 'RSVP Limit', 'Waitlist Count'].join("\t") | |
BLACKLISTED_NAMES = ['Hackfest!', | |
'Office Hours', 'Hackathon', 'Hac NYC Haskell Hackathon — Friday Festivities', | |
'Hac NYC Haskell Hackathon', 'Sunday Hack Hours', | |
'Sunday Hack & Office Hours', 'Lisp Invitational Summer Party', | |
'RubyConf East (aka HurriConf / FrankenConf)', | |
'Hack Night at TrueCar', 'Hack Night at Carbon Five', | |
'January Monthly NYC Java Meetup', | |
'January NYC Java Meetup: special meeting: A Java Web Frameworks Comparison', | |
'android study group', | |
'weekly android study group', | |
'January NYC Java Meetup: special meeting: A Java Web Frameworks Comparison', | |
'Joint meeting with NYC-GTUG: Android Development and Testing', | |
'Scala Primer', | |
'Scala Primer - Part 2', | |
'Scala Primer - Part 3'] | |
events.reject{|e| BLACKLISTED_NAMES.include?(e.name)}.each do |e| | |
puts [Chronic.parse(e.time.to_s).strftime("%Y-%m-%d"), | |
e.yes_rsvp_count, | |
e.event_url, | |
e.name, | |
e.respond_to?(:rsvp_limit) ? e.rsvp_limit : 'unlimited', | |
e.waitlist_count | |
].join("\t") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment