fix khal
This commit is contained in:
parent
813195bed4
commit
8b32d1dc6c
1 changed files with 4 additions and 1 deletions
|
@ -1,11 +1,14 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import datetime
|
||||
import json
|
||||
import subprocess
|
||||
from html import escape
|
||||
|
||||
data = {}
|
||||
|
||||
today = datetime.date.today().strftime("%Y-%m-%d")
|
||||
|
||||
output = subprocess.check_output("khal list now 7days --format \"{start-end-time-style} {title}\"", shell=True).decode("utf-8")
|
||||
|
||||
lines = output.split("\n")
|
||||
|
@ -17,7 +20,7 @@ for line in lines:
|
|||
new_lines.append(clean_line)
|
||||
output = "\n".join(new_lines).strip()
|
||||
|
||||
if "Today" in output:
|
||||
if today in output:
|
||||
data['text'] = " " + output.split('\n')[1]
|
||||
else:
|
||||
data['text'] = ""
|
||||
|
|
Loading…
Reference in a new issue