summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
af7bd79)
- altered to read password from a file
- deactivated the hard-coded password
- several other small rearrangements
- added password file to .gitignore
+# configuration options
+database_filename = "mako_open_todos.csv"
+caldav_url = "https://mako:{pw}@nimbus.mako.cc/remote.php/dav/calendars/mako/personal/"
+
import datetime
import mailbox
import numpy as np
import datetime
import mailbox
import numpy as np
import caldav
from caldav.elements import dav, cdav
import caldav
from caldav.elements import dav, cdav
-nimbus_password = '7TS3L-xABPz-8PJwn-zxAz7-ZY2Y5'
-database_filename = "mako_open_todos.csv"
+# read password from a file
+with open("nextcloud_password_file", "r") as f:
+ nimbus_password = f.read().strip()
current_timestamp = datetime.datetime.now()
data_original = pd.read_csv(database_filename)
current_timestamp = datetime.datetime.now()
data_original = pd.read_csv(database_filename)
get_flags_for_maildir("~/incoming/mail/uw-inbox"))
# load calendar data
get_flags_for_maildir("~/incoming/mail/uw-inbox"))
# load calendar data
-caldav_client = caldav.DAVClient("https://mako:{pw}@nimbus.mako.cc/remote.php/dav/calendars/mako/personal/".format(pw=nimbus_password))
+caldav_client = caldav.DAVClient(caldav_url.format(pw=nimbus_password))
cal = caldav_client.principal().calendars()[0]
caldav_count = np.sum(["PERCENT-COMPLETE:100" not in c.data
cal = caldav_client.principal().calendars()[0]
caldav_count = np.sum(["PERCENT-COMPLETE:100" not in c.data