From b8d3e6501837024283b353f28d9c7c22f5a5a50c Mon Sep 17 00:00:00 2001 From: Yannik Enss Date: Tue, 13 Jul 2021 15:07:32 +0200 Subject: [PATCH] read events from khal --- generate.py | 3 +++ list_termine.sh | 3 +++ 2 files changed, 6 insertions(+) create mode 100755 list_termine.sh diff --git a/generate.py b/generate.py index 0e56d86..8ca4744 100755 --- a/generate.py +++ b/generate.py @@ -131,6 +131,9 @@ def conf2top(top): except OSError as e: print("Warning: Error opening", top["file"], file=sys.stderr) + if "command" in top: + body = subprocess.run(top["command"], shell=True, text=True, capture_output=True).stdout + return Top(top["title"], sender, body, protostub) if __name__ == "__main__": diff --git a/list_termine.sh b/list_termine.sh new file mode 100755 index 0000000..641a57d --- /dev/null +++ b/list_termine.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +khal list --day-format "" --format "* {start} {title}" -a calendars_fsmi today 7d