GTG

Comment 5 for bug 329989

Revision history for this message
Ryan Paul (segphault) wrote :

I have implemented a D-Bus interface in revision 259 of my branch:
http://bazaar.launchpad.net/~segphault/gtg/couchdb-backend/revision/259

It supports the following methods:

get_task_ids()
get_task(tid)
get_tasks()
get_task_ids_filtered(tags, status, started_only, is_root)
get_tasks_filtered(tags, status, started_only, is_root)
has_task(tid)
delete_task(tid)
new_task(status, title, duedate, startdate, donedate, tags, text, subtasks)
modify_task(tid, task_data)
open_task_editor(tid)
hide_task_browser()
show_task_browser()

I have published some sample code that demonstrates how to use it here:
http://gist.github.com/143430

The tasks are returned as python dictionaries with the following values:

{"id": task.get_id(),
 "status": task.get_status(),
 "title": task.get_title(),
 "duedate": task.get_due_date(),
 "startdate": task.get_start_date(),
 "donedate": task.get_closed_date(),
 "tags": task.get_tags_name(),
 "text": task.get_text(),
 "subtask": task.get_subtasks_tid()}

The modify a task, you can change those values in the dictionary and then pass the modified dictionary as the task_data parameter in the modify_task method.

For reasons that I don't entirely understand, filtering on tags does not work. Everything else should work as expected. I'm hoping that somebody who is more familiar with the program's internals will be able to fix the tag filtering part.