Monday, April 9, 2007

Google Reader hacks, Velib', Spring

So, it has been about 6 months since I've switched to Google Reader (from Planet) and I enjoy it a lot. But I have still some issues with it :

  • it is almost unusable with n800 web browser, because of its intensive javascript usage,

  • it isn't possible to have a offline version of Google Reader.
Why offline, would you ask ? Well, for severals years (must be about 7 years now), I've been using my Palm as an offline web browser to read various news during my commuting time (with is about 30 minutes every morning). At first, I was using AvantGo but I switched to JPluck, associated with Planet, to generate an offline database of webpages to read every morning. It was ok, until I switched to Google Reader, since I still needed to keep Planet running and synced with Google Reader feeds list. Fortunately, some people have been documenting Google Reader unofficial API and this weekend, I took some time to play with it to grab a feed of unread items, just like Planet. And it is really too easy to be true :

First, you need a Session User Id from Google, where you authenticate :
SID=`curl --silent -d service=reader -d "Email=your_google_account@gmail.com" -d Passwd="Your_Password" -d source="lens" -d continue="http://www.google.com/" https://www.google.co/accounts/ClientLogin | grep ^SID= | sed -e 's/SID=//'`
then you just query Google Reader for the items on your reading-list, excluding already read items :
curl --silent --cookie "SID=$SID;domain=.google.com;path=/;expires=1600000000" "http://www.google.com/reader/atom/user/-/state/com.google/reading-list?xt=user/-state/com.google/read"
And you'll get a nice Atom feed. It would have been nice if JPluck was able to use Atom feed, but it only supports RSS, so I used XSLT stylesheet to convert Atom to RSS 2.0. Et voilĂ .

So, what is left to get my perfect offline feed / web reader :
  • migrate from my Palm T3 to n800 : I could use FBReader but my initial tests weren't very conclusive, since FBReader doesn't fully support keyboard navigation (I don't like using stylus in the bus, I prefer to keep using hardware buttons) and I'm getting used to n800 browser.

  • replace JPluck with something else : this is probably the way to go and I'm thinking about wget and/or some perl script to strip any unwanted html (javascript, applet, flash). It should be easily doable by parsing Atom feed, running wget on the various links, and generating a summary webpage from Atom feed using XSL

  • moving the entire process on n800 : wouldn't it be nice to just choose "update feed" on n800 and have it doing the entire job. I'm not sure it will be possible since Perl isn't available on Maemo but I guess I shouldn't be wondering about that now. Instead, I should do the previous steps first ;)
Velib'
Paris City has decided to install low cost bike rental system, called Velib' which looks quite interesting : 1€ per day, 5€ a week or 29€ a year, constraint being each ride must be less than 30 minutes (or there is additional fee required), available 24h a day and with 20 000 bikes over 1500 stations by end of 2007. I'm not a bike person but this might push me to try using them from time to time. Work has begun for building bike stations (launch is for Summer 2007) and I took this opportunity to test Google "My Maps" feature to get a map of in-progress bike stations. And I must say it is really easy to create customized maps with their UI. I'll try to update this map when new building sites are added on Velib' website.

Mandriva 2007 Spring
Month of March and beginning of April have been crazy for me (and everybody working on the distro) but I'm quite happy with soon to be released Mandriva 2007 Spring (I don't have the exact date, should be in very few days). If you want to know what to expect from it, take Spring tour, but I can give you a secret : GNOME 2.18 is in it ;)