From 1913d4eed4d3e031b601aefe995c4c3d685c2008 Mon Sep 17 00:00:00 2001 From: neingeist Date: Mon, 18 Mar 2013 07:08:39 +0100 Subject: [PATCH] make conversion of task properties explicit & strip whitespace in description --- mail2taskwarrior | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mail2taskwarrior b/mail2taskwarrior index bd107f4..d21f251 100755 --- a/mail2taskwarrior +++ b/mail2taskwarrior @@ -20,5 +20,8 @@ for line in fileinput.input(): msg = email.message_from_string(msg_string) subject = email.header.make_header(email.header.decode_header(msg.get("Subject"))) +tdesc = str(subject).strip() +tdue = str(int(time.time())) + w = TaskWarrior() -w.task_add(str(subject), due=str(int(time.time()))) +w.task_add(tdesc, due=tdue)