"lastExit" is a Dashboard Widget that will parse a schedule on a remote server and tell you if you still have plenty of time to catch your bus (train, ferry, whatever) or if it's late and you must hurry.
Now, no longer will you be be confused with trains you missed already or that go on sundays only. All you see are departures that are relevant at the particular time you consult your dashboard, neatly arranged into categories: "missed", "hurry", "in time".
On the backside of the widget you can configure, what "missed" or "hurry" means in your case. Maybe, you still have 25 Minutes time left until your train actually leaves, but since you need 30 Minutes to get there - you allready missed it. You determine if you want to be bothered with missed trains at all - and how many entries your personal schedule shall display.
Finally - the online schedule is an ordinary iCalendar file. It's easy to make your own schedules with ical, place them online and share them with your friends.
I hope you find it to be useful. Please, let me know what you think!
Last Exit relies on a script, that parses iCalendar files which I wrote in Ruby. If you feel inclined, have a look at it.
There are still lots of improvements to be made:
Although Ruby has all this convenient exeption-handling built in, I don't do any at all. Surely, when downloading ical-Files from the web, some "try-catch" would be in order.
If an invalid ical-URL is entered in the widget's preferences, you get to see the text "undefined" in the frontend. That is so bad!
Another unfinished matter is parsing the recurrence-rule. So far, the only thing it can do is parse events that reoccur weekly.
It would be nice to allow events to reoccur on a daily basis. Doesn't work yet though.
If the timeframe you are looking at ranges from one day to the other, this widget will seize to work: It only shows Events that happen on the day you are actually using it. So if you have some trains leaving at 0:05, 0:15, 0:25 and so on – but you are looking at the schedule at 11:50pm none will show up.
All in all, it maybe better, to download the whole schedule from the web once and consulting a local file - say, until you change the preferences or press a "reload"-button.
Oh, there is so much left to be done... but, what can I say? It works for me! And unless I know for sure anybody else is using it, it's unlikely that I will invest a single more minute to improve it :-)
Comments (3)
Großartig, Kolja!
Du hattest mir ja schon davon erzählt. Ich frage mich nur, wie die URL aussehen muss, die ich in Dein Widget eingeben muss.
In welcher Art werden denn Webseiten geparst? Bzw. was für eine Art von Website kann ich da eingeben? Gib mir mal ein Beispiel..
Mit der HVV-Seite hats leider nicht geklappt :(
Posted by Gunnar | August 12, 2005 11:01 AM
Posted on August 12, 2005 11:01
Der URL muss auf eine iCalendar-Datei zeigen.
Diese hat die Endung ".ics" und kann mit iCal erzeugt werden.
Für meine Fähre nach Hongkong benutze ich z.B.
http://www.keinegna.de/webdav/YSWFerry.ics
Wenn man das einfach in Safari eingibt, wird automatisch iCal geöffnet und ein neuer Kalender angelegt.
Posted by Kolja Wilcke | August 16, 2005 7:59 AM
Posted on August 16, 2005 07:59
My Last Exit only tells me the trains I've missed. I can't figure out why this is. My calendar is located at http://home.case.edu/~ret7/rl.ics
Thanks,
Ryan
Posted by Ryan | January 12, 2006 12:10 AM
Posted on January 12, 2006 00:10