Skip to content

Instantly share code, notes, and snippets.

@deluan
Created December 11, 2011 22:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deluan/1463077 to your computer and use it in GitHub Desktop.
Save deluan/1463077 to your computer and use it in GitHub Desktop.
Script to export attendees from an Facebook Event ICS (iCalendar) file to a CSV file.
#!/usr/bin/env groovy
import java.util.regex.*
def inviteFileName = args[0]
def inviteFile = new File(inviteFileName)
def pattern = Pattern.compile('^ATTENDEE;CN=(.*);PARTSTAT=ACCEPTED:(.*)')
inviteFile.eachLine { line ->
def m = pattern.matcher(line)
if (m.matches()) {
println "${m.group(1)};${m.group(2)}"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment