Skip to content

Instantly share code, notes, and snippets.

@avkoval
Created January 8, 2017 10:22
Show Gist options
  • Save avkoval/0ac95c788a845a71654603f1be497b55 to your computer and use it in GitHub Desktop.
Save avkoval/0ac95c788a845a71654603f1be497b55 to your computer and use it in GitHub Desktop.
Save some ICS files
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import requests
GOOGLE_CAL_URL = 'https://calendar.google.com/calendar/ical/'
CALENDARS = {
'My': 'alex.v.koval%40gmail.com/private-somehash%%%/basic.ics'
}
def main():
for name, address in CALENDARS.items():
open("%s-google-calendar.ics" % name, "w").write(
requests.get(GOOGLE_CAL_URL + address).text
)
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment