Commits

Anonymous committed 7a7b2f6

Adding project and context name to notes

Comments (0)

Files changed (1)

src/mekk/nozbe/json_writer.py

             shared = "YES"
         else:
             shared = "NO"
-
         action['project_name'] = proj_hash_to_name[action['project_hash']]
         action['context_name'] = ctx_hash_to_name.get(action.get('context_hash', ''))
         action['recur_desc'] = nozbe_client.recur_label(action['recur'])
         notes = []
     print "   DONE."
 
+    for note in notes:
+        note['project_name'] = proj_hash_to_name[note['project_hash']]
+        note['context_name'] = ctx_hash_to_name.get(note.get('context_hash', ''))
+
     output = codecs.open(json_filename, "w", encoding = "utf-8")
     simplejson.dump(
         dict(projects = projects, contexts = contexts, actions = all_actions, notes = notes),