REVEALED: Protective - Everything We Know
Or : restobook 0.5, the WS-DWIM release.
Earlier this week, Leonard roped me in to doing an informal presentation on my Series 60 Python hacking over lunch. When I got to the part about restobook, I explained how :yelp is converted into a proper URL and stored as such in the address book. JR, who works at Y! Local, piped up and asked if I would do the same for their unique identifiers. So I did.1234
I have played with the Y! Local APIs a bit but I hadn't really considered them in the context of restobook until JR and I started exchanging email afterwards. Here's how the new features built themselves out over the course of the next four or fives shuttle bus rides between the Mothership and the city :
- If you store
:ylocalin the extended description for a del.icio.us post, restobook will convert it into a proper URL.1234
- If you store
:ylocalin the extended description for a del.icio.us link and do not also define an1234
:addressproperty, restobook will ask Y! Local for a dump of the information about ID 1234 and store it in your address book accordingly during a merge. - If you enter
y:1234when you adding a restaurant from restobook itself, restobook will ask Y! Local for a dump of the information about ID 1234 and build:address,:phoneand other properties to include in the del.icio.us post accordingly. George pointed out that she would never enter a numeric ID and the truth is neither would I. But you can. - If you have enabled Y! Local searching (in restobook) and defined a default search location (say,
San Francisco, Ca
) when you add a restaurant from restobook it will first ask Y! Local for anything matching the place you are adding in said location. If you find what you're trying to post in their list of matches all the relavant data is squirted in to the del.icio.us post and your address book is updated right away. At least in big (American?) cities, this works surprisingly well. Walking through Nob Hill the other day I spotted an Italian restaurant, called Milano, that might be worth trying and the Y! Local stuff Just Worked.
The APIs don't include business hours or cross-street information which would make them even more awesome. In their absence, not having to enter address and phone information is pretty great all the same.
I also bought a Bluetooth enabled GPS unit recently, so I look forward to playing with that and seeing how it can be used in the context of applications like restobook. At first it seems obvious that you'd want to always use your current coordinates when adding a restaurant but the point of the functionality is to be able to add stuff to del.icio.us quickly when you think of it and not necessarily when you are walking past it. In that sense, defining a default location, or context, may still be a better approach.
Or maybe a popup menu that lists your current location, your default location (assuming it's different) and the option to enter something by hand. That seems more likely. There are a couple other tricks for figuring out your current
location, on the fly, but I'm not allowed to tell you about them yet.
Soon, hopefully.
This blog post is full of links.
#smallpingsKMimeType application/dwim
Or : restobook 0.4, now with search-fu.
The good : You can now search your addressbook contacts using a select menu containing the aggregate tags for all the restaurants you've merged from which you can quickly choose stuff like beer+sf
or sf+downtown+investigate
.
The bad : I don't think there's a way, in Series 60 Python, to programatically open an address book contact in the address book itself.
At the moment, I am employing an ugly hack. When you select a restaurant and you want to see its details, the database entry is written to disk as a vCard and then passed off to the built-in content handler
framework which opens it in something called the Business Card Viewer
. Which is fine except that there is no functionality beyond viewing and importing the card in to your address book. No dialing phone numbers. No opening URLs. Nothing.
So, I guess I will have to write more code to Do What I Mean. But not in this release. Instead, I've added a prompt when the application starts that allows you to run in offline mode so you can do your search-y bits without having to hassle with GPRS and SSL certificate dialogs.
Finally, the nice yelp people have launched their mobile site so I've updated the magic :yelp handler to point to it. Optimized for the Treo
, indeed.
Update : I've released version 0.41 which parses the raw address for @ Some Cross St. and stores a match as a note. Useful, that.
Oh and also, the tool to fetch and merge Flickr account data for an address book contact that started all this nonsense : It was finally released the other day.
This blog post is full of links.
#dwim