Overview

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 dangerSync.py --prod --user=USER --passwd=PASSWD >,session-creds
    python dangerSync.py --prod --session=`cat ,session-creds` --get contact
    python dangerSync.py --prod --session=`cat ,session-creds` --get event
    python dangerSync.py --prod --session=`cat ,session-creds` --get note*
    
  • dump XMLRPC data from the shelf to RDF:

    dangerSync.py --xml event >event.rdf
    dangerSync.py --xml contact >contact.rdf
    
  • dump just events that affect the future:

    dangerSync.py --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/DBP.pm line 982.\n'>

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

Microformats

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

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

RDF Calendar

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

python hipsrv.py --current=2007-01-01 --category=home --todo \
    event-rdf.kid home-events.rdf
python toIcal.py <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 'http://majo@calendar.sidekick.dngr.com/event?id=' >event-mixed.rdf

Mailing Labels

Starting with contact.rdf as above:

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

perl jobieLabels.pl contactLabels.rdf >contactLabels.ps

Gone fishing upstream

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

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