Created
January 8, 2017 10:22
-
-
Save avkoval/0ac95c788a845a71654603f1be497b55 to your computer and use it in GitHub Desktop.
Save some ICS files
This file contains 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 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