Last active
April 30, 2017 12:45
-
-
Save janseeger/4d05d0424ca940cade45fc81c4f2c61b to your computer and use it in GitHub Desktop.
Small script that extracts all calendar events from a Baikal (http://sabre.io/baikal/) database and writes them into separate 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/python | |
import sqlite3 | |
conn = sqlite3.connect("db.sqlite") | |
c = conn.cursor() | |
for row in c.execute("SELECT calendardata,uri FROM calendarobjects"): | |
f = open(row[1], "wb") | |
data = row[0].encode("UTF-8") | |
f.write(data + "\n") | |
f.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment