From 24e6cb113107a3373a3c053b0070d7b3b3fab51d Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Wed, 17 Dec 2014 00:55:32 +0100 Subject: todo: loop over context array and add each to string This commit changes the format of the todo file to use a table for the contexts instead of just a string --- todo | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/todo b/todo index a533940..5673a1d 100755 --- a/todo +++ b/todo @@ -130,7 +130,10 @@ def main(): if 'url' in entry: output += "\n URL: {}".format(entry['url']) if 'context' in entry: - output += "\n Contexts: {}".format(entry['context']) + context_line = '\n Context:' + for c in entry['context']: + context_line += ' {}'.format(c) + output += context_line print(output) -- cgit v1.2.3-54-g00ecf