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 ;)

7 comments:

  1. Comment from osma:

    I share your situation re: N800. It would of course be quite ideal to be able to use the Maemo Feed Reader, except that it is quite a horrible UI for such a purpose. How I wish it could show feeds in a common timeline (like Google Reader), and integrate with the web browser for marking articles to be downloaded to an offline copy when connected the next time..

    ReplyDelete
  2. Comment from Luis Villa:

    Couldn't you use planet to do atom->html? And wouldn't that work on the N800 as a bonus?

    Please do post if you figure this situation out- I would love to have a good offline, no-stylus, blog repository on my N800.

    ReplyDelete
  3. osma> As you have figured, n800 Feed reader (as well as 770) is not usable in offline mode for a lot of feeds where content itself is only linked to feed item and I don't think there is anything we can do about that :( Marking articles as read can also be done using curl, so a full Maemo UI could be done around Google Reader API. There is already a desktop application written but it is in python and wxWidget 2.8 :(

    Luis> I don't think it is worth using planet (or venus) just to do atom to html conversion, since it would pull python in the equation and the less interpreter we use on 770/800, the better IMO. But after searching a little, I found a Atom 0.3 to HTML XSL stylesheet at http://plasmasturm.org/code/atom-to-html/. We just need to install xsltproc (from our dear friend DV) which is already available from Maemo.

    ReplyDelete
  4. Comment from jonty:

    Perl is installed on the nokia 770 by default in the later filrmware builds, I would have thought the same was true of the N800...

    ReplyDelete
  5. I just checked and perl is no longer present is IT2007 (maemo 3.0 and 3.1).

    ReplyDelete
  6. Comment from Luis Villa:

    I haven't had a chance to check it out yet, but I saw this linked to today. May be worth looking at.

    ReplyDelete
  7. Luis> just tested : it works in osso-term and can be used only with navigation pad, which is quite nice. It is only useful for feeds with entire text and of course, since it is only terminal based, it is a little crude, but it is a good start ;)

    ReplyDelete