ForumsDevelopersPoodledo fork (Python API)
Poodledo fork (Python API)
Author | Message |
---|---|
MTvB |
Hej,
I have set up a git repository containing Felix Riedels excellent python API (a.k.a. Poodledo). Find it under http://github.com/martint17r/poodledo It includes a number of fixes of myself and others, namely: - Fix python 2.5 integration #12 - getServerInfo has a new field #17 And most important - a mechanism to use a yaml config file to read credentials and cache tokens (it is compatible to the ruby library). Cheers Martin |
Warren |
Hi Martin,
Any reason for the fork? Felix has been responsive to my requests to update Poodledo and was receptive to patches. Just wondering. |
MTvB |
Hej,
I needed a working API and neither poodledo nor the ruby port was satisfying. So this was a one weekend hack. I don't mind merging it back to Felix, I just wanted to share the work I had to done to ease anybody elses' attempts. Cheers Martin |
Warren |
Cool. Have you developed any interesting python code to interact with toodledo? Other than the API? I have a few ideas but haven't had the time to sit down and code them.
|
MTvB |
I am currently working on a project. To test the API I wrote a short script to dump all toodledo tasks into a text file, to be read by yagtd or todo.sh (with small tweaks). Here's the script:
---------------------- bite bite bite ---------------------- #!/usr/bin/python # (c) 2010 Martin Treusch von Buttlar from poodledo import ApiClient client = ApiClient(application_id="toodledo2txt") client.authenticate() def escape(word): if word.find(" ")>0: return "[%s]" % word else: return word folders = client.getFolders() foldersByID = dict(map(lambda x: (x.id, x), folders)) tasks = client.getTasks(notcomp=True) tasksByID = dict(map(lambda x: (x.id, x), tasks)) for task in tasks: print task.title.encode('utf-8'), if task.context!='None': print "@%s" % escape(task.context.encode('utf-8')), if task.folder!=0: print "!%s" % escape(foldersByID[task.folder].title.encode('utf-8')), if task.parent>0 and tasksByID.has_key(task.parent): print "p:%s" % escape(tasksByID[task.parent].title.encode('utf-8')), print "" ---------------------- bite bite bite ---------------------- Cheers Martin |
You cannot reply yet
U Back to topic home
R Post a reply
To participate in these forums, you must be signed in.