diff options
author | Johannes Löthberg <johannes@kyriasis.com> | 2014-12-17 00:55:32 +0100 |
---|---|---|
committer | Johannes Löthberg <johannes@kyriasis.com> | 2014-12-17 00:55:32 +0100 |
commit | 24e6cb113107a3373a3c053b0070d7b3b3fab51d (patch) | |
tree | 75947b408b8dda11861230a87e9d5c86a631a5c2 | |
parent | e96c30f6ad573704061acd1b8970dd6c4b8c54cb (diff) | |
download | todo-24e6cb113107a3373a3c053b0070d7b3b3fab51d.tar.xz |
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
-rwxr-xr-x | todo | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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) |