Personal tools
You are here: Home / Members / alex's Home / Syndicating ToDo Lists

Syndicating ToDo Lists

Filed under: , , ,
I experimented with the RDFGrabber product to see if I could pull in my todo-list (saved as XML on my Zaurus) as a right-box.

The todo-list gets pulled into Zope in a similar way to the package information. To get things to work:

  • I put an item on my todo list on the Zaurus.
  • Whenever I switch the thing off, it backs itself up to the server in the loft, using rsync to only send changes.
  • There's a rightbox item under the member's folder in plone on www.floop.org.uk, which gets called if: there's an RDFGrabber object called todo, owned by the current user
  • The rightbox asks for all individuals of type todo:InCompleteTask.
  • The individuals() method will update the RDFGrabber instance if it's out of date and a specified minimum time period has expired
  • The update grabs an RDF file from the server in the loft, which in turn applies an XSL transform to the copy of the Zaurus todo-list in XML.

Which is a convoluted way of saying that I'm quite chuffed that it even works. The page template stuff is really nice; I get to generate the rightbox using stuff like:

  <img src="some.png" tal:attributes="src task/todo_priority/vis_icon" />
  <span tal:replace="task/todo_summary | nothing" />

The hardest bit was mapping the priority information into RDF. The Zaurus stores it as an XML attribute called priority, which takes a number between 0 and 5. (a) not very descriptive, but (b) easy to sort by. I decided to make it more descriptive by using an rdf:Class for each priority from v.low to v.high, so that I could use class properties to define the labels, icons etc. I just used another property to map the classes to integers, so that they could be sorted easily.

Document Actions