PalmAgent -- synchronizing data in my palm with the rest of the Web

palmagent is a collection of tools for synchronizing data from mobile devices to other parts of the Web. It's something of a skunkworks project, with accomplishments documented in journal/blog entries such as:

Some of the code here was developed back around 2001 when I used a palmpilot. Notes on Palm OS features, issues, and requirements are kept separate now.

Tags: mobile, travel, gtd, calendar, geo, music, python microformats, GRDDL, RDF, sync

dangerSync XMLRPC

  • Get data from a danger sidekick account into a shelve store via their XMLRPC interface and get incremental updates:

    python --prod --user=USER --passwd=PASSWD >,session-creds
    python --prod --session=`cat ,session-creds` --get contact
    python --prod --session=`cat ,session-creds` --get event
    python --prod --session=`cat ,session-creds` --get note*
  • dump XMLRPC data from the shelf to RDF: --xml event >event.rdf --xml contact >contact.rdf
  • dump just events that affect the future: --newer 20050515 >plan.rdf

*Known issue: incremental updates to note DB results in:

XMLRPCxmlrpclib.Fault: <Fault 0: 'org.apache.xmlrpc.XmlRpcException: org.apache.xmlrpc.XmlRpcException: APPX: Can\'t call method "read_only" on an undefined value at //danger/local/lib/perl5/site_perl/5.8.5/Danger/ line 982.\n'>

work-around: just remove the note DB file and get all the notes again.


  • convert contact data (from Work category) to hCard:

    xsltproc --novalid --stringparam Category Work --output work.html asHCard.xsl contact.rdf

RDF Calendar uses templates to render data from the shelve db; for example, in RDF calendar format, which can be converted to .ics

python --current=2007-01-01 --category=home --todo \
    event-rdf.kid home-events.rdf
python <home-events.rdf >home-events.ics

The template approach is much faster than the earlier N3 rules approach:

cwm plan.rdf danger.n3 --think=danger2ical.n3 --rdf --with '' >event-mixed.rdf

Mailing Labels

Starting with contact.rdf as above:

cwm contact.rdf contactLabels.n3 --filter=contactLabels.n3 --data --rdf >contactLabels.rdf

perl contactLabels.rdf >

Gone fishing upstream

Some work that started here has moved upstream to...:

See also: GRDDL, microformats, and paper-trail style synchronization.