make conversion of task properties explicit & strip whitespace in description
This commit is contained in:
parent
6d589545e5
commit
1913d4eed4
1 changed files with 4 additions and 1 deletions
|
@ -20,5 +20,8 @@ for line in fileinput.input():
|
||||||
msg = email.message_from_string(msg_string)
|
msg = email.message_from_string(msg_string)
|
||||||
subject = email.header.make_header(email.header.decode_header(msg.get("Subject")))
|
subject = email.header.make_header(email.header.decode_header(msg.get("Subject")))
|
||||||
|
|
||||||
|
tdesc = str(subject).strip()
|
||||||
|
tdue = str(int(time.time()))
|
||||||
|
|
||||||
w = TaskWarrior()
|
w = TaskWarrior()
|
||||||
w.task_add(str(subject), due=str(int(time.time())))
|
w.task_add(tdesc, due=tdue)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue