Commits

Marcin Kasperski committed f73ab1e Merge

merge

Comments (0)

Files changed (4)

 a9ac3188f951636407bc17fe22068ec792bda927 0.4.0
 a9ac3188f951636407bc17fe22068ec792bda927 0.4.0
 579dc80f499441b63effd9caa548552d33354143 0.4.0
+4df6c876b0f9553d2f5fbf37dbbc2d50612fd500 0.4.1
+4df6c876b0f9553d2f5fbf37dbbc2d50612fd500 0.4.1
+aece7fa1043a668aade752636ed59f54f61800da 0.4.1
+7bb67c96309b52d23f67b6959924105a864f2baf 0.4.2
 
 (export to .json, completed actions are included).
 
+Note: only .json export contains notes!
+
 Development
 ===========
 
 
 from setuptools import setup, find_packages
 
-version = '0.4.0'
+version = '0.4.2'
 long_description = open("README.txt").read()
 
 classifiers = [

src/mekk/nozbe/json_writer.py

     print "   DONE."
 
     if include_completed:
-        print "Loading finished actions..."
+        print "Loading completed actions..."
         finished_actions = yield nozbe_client.get_completed_tasks()
         for fa in finished_actions:
             fa['completed'] = 1
             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'])
 
+    print "Loading notes..."
+    notes = yield nozbe_client.get_notes()
+    if notes is None:
+        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),
+        dict(projects = projects, contexts = contexts, actions = all_actions, notes = notes),
         output,
         sort_keys = True,
         indent = 4,