← Back to team overview

zim-wiki team mailing list archive

Todo list export function



I have been using Zim for a couple of weeks. It started out with me
comparing all free outliners and or desktop wiki apps I could find. And
the choice was easy.

Now I've also start using Zim as my todo list manager. Switching from
TaskCoach. The UI of Zim is easier and makes the work flow easier to
follow. The notetaking together with the todolist in the same app is

But there are some features I'm missing. First of all I would like a
Android app, but until someone picks up the bounti I've solved it by
making a page for notetaking on my phone and made a short cut on my home
screen to that folder on Dropbox. There I put notes on the run, and then I
fix it later on a computer.
Soon I will try runing a Zim in server mode on my home server, so I can
read my notes on the run from my phone surfing to my server.

But now to the important part of my first mail on this list. I really miss
a easy way of handling my todo's on my android. So I made a change to the
source code so that I can use Todo.txt on my android to read and sort the
Todo list. I know some python scripting but I have a hard time redaing the
pyGTK code (I only familiar with wxPython) and the structure of the
I would like for a start to add a button to the tasklist plugin that
exports the tasklist to a todo.txt file. How do I do that?

Here is the codesnippet for making the export:
	def get_visible_data_as_todotxt(self):
		'''Exports currently visible elements from the tasks list to Todo.txt'''
		text = ""
		for indent, prio, desc, date, page in self.get_visible_data():
			if prio >= 26:
				prio = 'A '
			elif prio <= 0:
				prio = ' '
				prio = '(%s) '%chr(ord('Z') - prio + 1)
			desc = desc
			if date <> '':
				date = 'due:' + date
			text += " ".join((prio, desc, date)) + "\n"
		return text

Daniel J

Follow ups