From 358ea2d32be88428df0c2739990a117132e98410 Mon Sep 17 00:00:00 2001 From: Mark Powers Date: Tue, 27 Oct 2020 20:11:18 -0500 Subject: Add multiple queries to email utils, add wiki from email. --- daily-update.py | 5 +---- email_helper.py | 25 ++++++++++++++++--------- wiki-from-email.py | 19 +++++++++++++++++++ 3 files changed, 36 insertions(+), 13 deletions(-) create mode 100755 wiki-from-email.py diff --git a/daily-update.py b/daily-update.py index 165372a..6a52d16 100755 --- a/daily-update.py +++ b/daily-update.py @@ -1,8 +1,5 @@ #!/usr/bin/python3 -import smtplib -import sys -import time import requests from datetime import date @@ -23,7 +20,7 @@ def get_weather(): def get_unread_reminders(): print("getting unread reminders") subjects = email_helper.filter_unread("subject", "REMINDER:", "subject") - subjects = [s[len("REMINDER: "):].strip() for s in subjects] + subjects = [s["subject"][len("REMINDER: "):].strip() for s in subjects] if len(subjects) > 0: reminder_html = "

Reminders: