Sunday, February 22, 2009

NextMuni for Ubiquity

I took a first run at writing this ubiquity verb mostly out of curiosity. NextMuni is an extremely useful service for even infrequent SF public transit-goers. When things work well, it lets you completely avoid the unfortunate waiting around Divisadero wondering when the 24 is coming.

A number of people have created tools to improve accessibility to the NextMuni service, including Mikhail P's yourmuni which I use constantly and is perfect for frequent commuters with a data phone. As far as I can tell, no one has written a NextMuni command for ubiquity yet, and it seemed an ideal candidate to benefit from command-line access, especially considering the somewhat-clunky interface on the current site.

Writing the command was, indeed, impressively straight-forward. Despite NextMuni's inexplicable lack of an API, extracting the relevant data from the simplified lookup pages was a task well-suited to jquery.

For those interested in trying out this rugged code, it can be subscribed to with the link at bottom. The command has some definite issues (cross streets must be capitalized and there's some flakiness in the preview update that I don't yet understand) but perhaps it will be useful to someone as an example or a tool.
Edit: the nextmuni website has changed since the programming of this command, and it is no longer working. Any developers interested in updating the code to work with the new layout are welcome to do so.

No comments:

Post a Comment