Itinerary How To

Volume 7, Issue 150; 25 Aug 2004; last modified 08 Oct 2010

Some time ago, I started generating itinerary pages for my travels. I’m sure I was inspired in part by Dan’s TravelTools and PathCross Wiki pages, so when Dan offered bonus points for describing how the pages are constructed, how could I resist?

The use of traveling is to regulate imagination by reality, and, instead of thinking how things may be, to see them as they are.

Samuel Johnson

Some time ago, I started generating itinerary pages for my travels. I’m sure I was inspired in part by Dan Connolly’s TravelTools and PathCross Wiki pages, so when Dan offered bonus points for describing how the pages are constructed, how could I resist?

All of the important data is in my “personal information appliance.” In other words, I get it all out of my Palm. What usually happens is this:

  1. Some event crosses my radar (conference, working group meeting, vacation, invitation to speak, whatever). As soon as I know about an event, I create an appointment in my Palm.

    Let’s take the October, 2004 TAG face-to-face meeting as a concrete example. Here’s the appointment for that meeting (I’m displaying the synced XML, simplified a little, for convenience):

    <appointment>
      <description>TAG f2f</description>
      <begin date="2004-10-05"/>
      <repeat frequency="1" type="Daily" end="2004-10-07"/>
      <datebk4 category="7" timezone="GMT-5:00"/>
      <note>rdf:
    it:tripid trip-2004-10-tag
    p:access public
    p:class undecided
    </note>
    </appointment>

    I use RDF in the note field to extend the Palm database; it all gets turned into RDF anyway.

    it:tripid

    Is a key that allows me to extract all the appointments related to a particular trip.

    p:access

    Controls which appointments are copied to http://norman.walsh.name/. Most things get copied (or not) based on their category, but for “Business” appointments, the default is “not” and I use p:access to override that default.

    p:class

    Is a badly named property that has essentially three states: yes, I’ve committed to go, I’m undecided, or no, I’m definitely not going. Appointments that have an undecided or not going class don’t conflict with other appointments, so I don’t get warnings about double-bookings. (In practical terms, the HTML view of my whole schedule doesn’t draw them in bright red.)

    I also add a note to the itinerary overview page for the year in question if I think it’s likely I’ll go to the event:

    <listitem>
    <para xml:id='p11'>05-07 Oct, TAG, Basel, CH. (Planned.)
    </para>
    <?calendar month="2004-10" highlight-start="05" highlight-end="07"?>
    </listitem>

    The calendar processing instruction generates the colorized calendar. In theory, the information needed to build that calendar is in the data, but as we’ll see, it’s not always completely straightforward.

  2. At some point, I actually decide that I’m going to participate in the event. Most of my travel is work-related so the next step is to get an expense request together. To do that, I call the corporate travel agent and figure out an itinerary so I can price the airline ticket.

    In this case, the itinerary takes me through London and staying over the Saturday night makes the ticket vastly cheaper, so I decide to tack a few days onto the front of my trip and visit my folks. That’s what makes getting the right colorized calendar tricky; it doesn’t correspond to any particular appointment.

    Eventually, I get an email message with a bunch of transportation, rental car, and hotel information in it. That’s not very useful, so following Dan’s lead again, I scrape it into RDF-augmented Palm appointments. Now I have a bunch of new entries like this one:

    <appointment>
      <description>BOS-LHR/AA 108</description>
      <begin date="2004-09-29" time="19:10:00"/>
      <end date="2004-09-29" time="06:35:00"/>
      <repeat frequency="1" type="Daily" end="2004-09-30"/>
      <datebk4 category="12" icon="14" spans_midnight="1" timezone="all"/>
      <note>rdf:
    it:tripid trip-2004-10-tag
    it:depart xab:BOS
    it:arrive xab:LHR
    it:flight "108"
    it:airline "American Airlines"
    it:class "S"
    it:seat "23C"
    it:meal "dinner/cont. breakfast"
    it:equip "777"
    it:duration "6:25"
    it:miles "3265"
    p:uri http://www.seatguru.com/american/B772A.shtml
    p:who xab:american-airlines
    p:access public
    
    MOVIE/TELEPHONE/AUDIO PROGRAMMING/
    DUTY FREE SALES/NON-SMOKING/
    IN-SEAT POWER SOURCE
    DEPARTS BOS TERMINAL B  - ARRIVES LHR TERMINAL 3
    </note>
    </appointment>

    The “xab:” prefix identifies entries in my address book, which associates the flight with arrival and departure airports, airlines, etc.

    I also update the event appointment at this point, so that it’s no longer “undecided.” I also add a p:hotel property to identify the hotel I plan to stay at, if I’ve figured that out.

  3. If I’m going to new airports, or staying at new hotels, I make address book entries for them. I could get some information about the airports from other public data sources, but I prefer to have my own address book entries for them.

  4. Shake well and stir until smooth.

    I run cwm to build an RDF file containing everything in my Palm, then I run a few stylesheets that use RDF Twig to extract the “public” information and build what.rdf, when.rdf, where.rdf, and who.rdf. These are all cwm’d together along with all the other site metadata to produce norman.walsh.name.rdf (that’s more than 3Mb so think before you click).

    The stylesheets that actually build HTML and PDF pages on this site use that RDF data.

  5. Make the flight maps and copy them to the right places. All the departure and arrival information is already in my Palm and the airports have geographic metadata, so all I do is run make TRIPID=trip-2004-10-tag tripmap. Sweet.

  6. Write the itinerary page. I use a processing instruction, <?itinerary tripid="trip-2004-10-tag"?>. to produce the itinerary and table of appointments automatically from the Palm data.

  7. Update the overview page:

    <listitem>
    <para xml:id='p25'><link xlink:href="09-28-tag">28 Sep-08 Oct</link>,
    Vacation, Norwich, UK; TAG, Basel, CH.
    (Booked.)
    </para>
    <?calendar month="2004-09" highlight-start="29" highlight-end="30"?>
    <?calendar month="2004-10" highlight-start="01" highlight-end="08"?>
    </listitem>
  8. Rebuild the site: type make.

Ideally, there’d be enough information in the RDF data on the site for an agent to determine where I’m going to be and when, the first step in determining if our paths will cross. In practice, I don’t think I’m quite there yet. First, I’m not producing standard RDF calendar data (periodically, I try to and eventually give up somewhere the RDF/iCal swamp) and second, there’s no explicit assertion that I’m attending any particular event. I think you could infer that, but it’d be better if I made it explicit in some standard way. If I knew of any standard way.

So, how many bonus points do I get? And is it more than the demerits I get for doing some of it by hand?

Update: 21 Mar 2005. The transition from a Palm to my Sidekick forced me to change some of the mechanics. In spirit, I'm still doing the same thing, but now I generate an intermediate XML representation which I paste into the itinerary page.

Comments

full marks for the howto... as to the manual bits... extra marks for admitting in public that your solution is less than perfect ;-) DontWorryBeCrappy!

—Posted by Dan Connolly on 30 Aug 2004 @ 06:43 UTC #