summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2014-12-17 00:58:10 +0100
committerJohannes Löthberg <johannes@kyriasis.com>2014-12-17 00:58:10 +0100
commit9cb11f52db3583e8d84189c2d6bae23555a7f984 (patch)
tree2380b28e0a009276d37b890f888199189f6a96a3
parent24e6cb113107a3373a3c053b0070d7b3b3fab51d (diff)
downloadtodo-9cb11f52db3583e8d84189c2d6bae23555a7f984.tar.xz
todo: print directly instead of appending to string
-rwxr-xr-xtodo15
1 files changed, 9 insertions, 6 deletions
diff --git a/todo b/todo
index 5673a1d..b13e84c 100755
--- a/todo
+++ b/todo
@@ -122,20 +122,23 @@ def main():
print('todo file: {}'.format(config.todo_file))
for t_id in todo_dict:
entry = todo_dict[t_id]
- output = first_line(t_id, entry)
+
+ print(first_line(t_id, entry))
+
if 'description' in entry:
description = entry['description']
text = color_bold(description)
- output += "\n {}".format(text)
+ print(" {}".format(text))
+
if 'url' in entry:
- output += "\n URL: {}".format(entry['url'])
+ print(" URL: {}".format(entry['url']))
+
if 'context' in entry:
- context_line = '\n Context:'
+ context_line = ' Context:'
for c in entry['context']:
context_line += ' {}'.format(c)
- output += context_line
+ print(context_line)
- print(output)
if __name__ == '__main__':
main()