Commit 0177b49b authored by Henrik Hüttemann's avatar Henrik Hüttemann

Add option to print to the console.

Signed-off-by: Henrik Hüttemann's avatarHerHde <mail@herh.de>
parent 040513b6
......@@ -22,4 +22,6 @@ FORMAT_DATE = "%Y-%m-%d"
FORMAT_TIME = "%H:%M"
FORMAT_DATETIME = FORMAT_DATE + " " + FORMAT_TIME
TEMPLATE_FILE = "plain.jinja" # Template file in templates/
\ No newline at end of file
TEMPLATE_FILE = "plain.jinja" # Template file in templates/
DRYRUN = False # Print to console instead sending an email.
\ No newline at end of file
......@@ -238,11 +238,12 @@ def main():
events = sorted(events, key=lambda event: event[1])
output_text = generate_output(events)
send_mail(output_text)
# print("TITLE: " + output_text[1])
# print("----------------------------------------")
# print(output_text[0].replace(' ', ' '))
if config.DRYRUN:
print("TITLE: " + output_text[1])
print("----------------------------------------")
print(output_text[0].replace(' ', ' '))
else:
send_mail(output_text)
if __name__ == "__main__":
main()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment