Google Reader Gears Search

Updated: a new version corrects some bugs. Please check the new GReader Gears Search Bug Fixed Edition. The download link in this post is for the new version too.

What is Google Reader Gears Search
It’s a Greasemonkey script that provides us a search function under Google Reader, the feed reader from Google, it uses Google Gears. This User Script has been tested in Mozilla Firefox for Ubuntu Linux, Mac OSX y Windows XP.

Google Reader Gears Search

What do I need
You must be using Greasemonkey and Google Gears, and at least you should been using Google Reader in offline mode once.

Does it present any limitations
It only can be used with Google Gears and Greasemonkey compatible web browsers. Furthermore the search results are perform only over the 2000 items stored in the Google Gears database.

What things can be improved
At this moment the search is performed over the same database table used by Google Reader, in this table you can’t use Full-Text Searches, so a simple/poor database query with like is being used. An idea is replicating this table in order it’s possible to perform Full-Text searches. The UI presenting the results could be better and adapted to the Google Reader one. The results should be paginated Just added!.All this features are in my mind, but now I’m out of time, at least until I finish my exams, but I think it isn’t a bad first solution.

How the idea became
The last week I was in the Google Developer Day 2007 at Madrid, and I had the oportunity of chatting with Chris Wetherell, the Google Reader Creator and the one choosed by Google to present the keynote about Gears in Madrid. One of my questions to Chris was about the troubles/options of including a search engine into Google Reader (for each user), Chris answered me at lightspeed explaining the problems associated to this kind of searches.I was a bit slow, maybe beacuase I was between a lot of Googlers, so I only listen to the answer, no more. But during the party (yes, we had a party at Madrid event) the idea became: how hard could be use Gears querying the local SQLite database? Chris, apart of being a good engineer and a great guy, brings my the inspiration to create the Greasemonkey script that query the local database. So Chris, thank you.

Last-minute
While I was writting this post I have been thinking about the possibility of maintaining a database table with all the Google Reader item, and not only the ones that are syncronized with Google Reader. It’s only another idea, but I write this in order to not forget that.

Feedback
You can send me feedback about Google Reader Gears Search through this entry comments and mailing me to: i@rau1.com.

P.S.
Sorry about my english.

Updated: a new version corrects some bugs. Please check the new GReader Gears Search Bug Fixed Edition. The download link in this post is for the new version too.

Download Google Reader Gears Search
v0.100, GPL license.



  1. Excelente idea, Raúl! Ya hay otros métodos, pero el tuyo parece el más fácil de implementar. Muchas gracias por dedicarle el tiempo y compartirlo.

    (short version for the spanish-impaired: thanks. great.)

  2. This is a great idea, thanks. Your English looks almost perfect, no apologies needed.

  3. Nada de “Sorry about my english”!

  4. Thank you guys!

    If you have some requests or suggestions, please let a comment.

  5. Great script! Really awesome that I can search my feeds now…

  6. I have Gears installed, Greasemonkey 0.7.20070607.0 installed, and this script. But when I entered a search field into the text box, clicked on Gears Search, nothing happens. My page gets reloaded and I am shown Reader’s home page. How did you guys get it to work?

  7. Hi.

    Great script. But I found an error in it. When the _USER_ID of google reader has 2 or more zeros at the beginning then the database name is not calculated correctly. Just replace this code (line 109):

    ” if (_USER_ID.charAt(0) == ’0′) {“+”\r\n”+
    ” var dbname = ‘GR-’ + parseInt(_USER_ID.substr(1)).toString(16);”+”\r\n”+
    ” } else {“+”\r\n”+
    ” var dbname = ‘GR-’ + parseInt(_USER_ID).toString(16);”+”\r\n”+
    ” }”+”\r\n”+

    with this

    ” var tempid = _USER_ID;”+”\r\n”+
    ” while (tempid.charAt(0) == ’0′) {“+”\r\n”+
    ” tempid = tempid.substr(1);”+”\r\n”+
    ” }”+”\r\n”+
    ” var dbname = ‘GR-’ + parseInt(tempid).toString(16);”+”\r\n”+
    ” db.open(dbname);”+”\r\n”+

  8. @Raymon: Have you synced you gears’ reader database at least once?

    @Marcin Jaworski: Thank you very much! I’m improving the current version, I have been studying the DOM and I have found the object where database name is stored, so in the future it’ll not need to convert the _USER_ID.

  9. This is quite a nice script. It really highlights the usefulness of search in greader.

  10. In case you weren’t aware, you can get a function’s source with its toString(), toSource() or valueOf() methods. It’s a lot easier to read if you define the functions within the script and then convert them to strings, rather than having line after line of ‘+”\r\n”+’…

    function f() { alert("hi"); }; var s = f.toString();

  11. @Sam Angove: OMG! How my code is hurting! Thank you, I’ll be using this advice.

  12. Raúl,
    This looks nice and went my new laptop arrives in a few weeks I’ll give it a go!

  13. Way to go! I’ve been looking for something like this! Thank you :)

  14. Something’s up with Google Reader today because when using this script, the content pane doesn’t show anything while the left navigation pane is fine.

  15. Parece que google ya ha integrado la función de búsqueda en su Reader. Por Fin.
    http://googlereader.blogspot.com/2007/09/we-found-it.html

  16. @mikmor, sí, y la verdad es que funciona muy bien. Gracias por el aviso!

  17. very interesting, but I don’t agree with you
    Idetrorce

  18. These are great information, I was glad I happen to stop by on your blog. My research is almost done, thanks for sharing this.

  19. tribal skull,

  1. 1 Google Reader加入搜索功能 at catch the digital flow

    [...] Raul Ochoa开发了一款Greasemonkey脚本, 在Google Gears的驱动下, [...]

  2. 2 All in a days work…

    [...] Google Reader Gears Search search through the last 2000 posts in Reader (tags: Google_Reader User_Styles/Scripts) [...]

  3. 3 Tech Links for Tuesday, 12 June, 2007 » Chandrasekhar Vallabhaneni

    [...] webapps that help you make the most of the giant web of connected computers that is your network. Google Reader Gears Search It’s a Greasemonkey script that provides us a search function under Google Reader, the feed [...]

  4. 4 Step by step add search in google reader using greasemonkey and google gears · Learning On Demand

    [...] Google Reader Gears Search, I forgot found that post today in either digg or stumbleupon [...]

  5. 5 Google Reader Gears Search  »Technology News | Venture Capital, Startups, Silicon Valley, Web 2.0 Tech

    [...] [...]

  6. 6 » Featured Greasemonkey User Script: Add search to Google Reader with Google Reader Gears Search

    [...] Until Google finally pushes out it’s own Reader search, this is a solution worth trying out. Google Reader Gears Search [Raúl Ochoa via Google Operating [...]

  7. 7 neunetz.com » 2 großartige, relativ unbekannte Firefoxerweiterungen

    [...] für Nutzer des GoogleReaders: Google Reader Gears Search fügt dem GoogleReader eine Suche für die eigenen Feeds hinzu. Vorausgesetzt man hat [...]

  8. 8 Búsquedas en Google Reader

    [...] Google Reader Gears Search es un script para Greasemonkey con el que podemos utilizar Firefox para realizar búsquedas en Google Reader. [...]

  9. 9 eLearning Service » Blog Archive » Add more search capabilities

    [...] search to Google Reader with Google Reader Gears Search From Lifehacker we get a pointer to blogger Raúl Ochoa’s Google Reader Gears Search that adds search to Google Reader by accessing the feed items synced with Google [...]

  10. 10 Realizar Búsquedas con Google Reader

    [...] Google Reader Gears Search es un simple scritp para Greasemonkey, con el que podemos hacer búsquedas con Firefox en Google Reader. [...]

  11. 11 Cruze de caminos » Blog Archive » Google reader

    [...] Google Reader Gears Search es un script para Greasemonkey con el que podemos utilizar Firefox para realizar búsquedas en Google Reader. [...]

  12. 12 kodebykosta » Blog Archive » Searching inside Google Reader

    [...] Το βρισκω αναγκη ολο και πιο συχνα αυτες τις μερες να μπορω να κανω αναζητησεις μεσα απο το Reader.. Να και ενα greasemonkey script που κανει search local db του Google Gears article [...]

  13. 13 How-to: Add Search to Google Reader

    [...] points if you happen to use Google Reader offline using Gears, because this greasemonkey script enables you to perform search on 2000 recently synced offline items. Both these scripts have [...]

  14. 14 links for 2007-07-22

    [...] Google Reader Gears Search – Raúl Ochoa 為 Google Reader 加上一個搜尋列, 可以搜尋最近兩千筆文章…… (tags: greasemonkey google) +++Relating Post+++ [...]

  15. 15 Community Response to Gears

    [...] Google Reader Gears Search adds search to Google Reader using Greasemonkey and the Gears full text search functionality. [...]

  16. 16 50+ Google Reader Extensions and Scripts For Firefox

    [...] Google Reader Gears Search – Uses Google Gears to search your posts. [...]

  17. 17 Busca no Google Reader - Blog do Culumim

    [...] uma versão com busca, mas por enquanto, a solução que encontrei foi instalar no meu Firefox um script que funciona em conjunto com o Google Gears e o [...]

  18. 18 50+ Google Reader Scripts For Firefox | Firefox.hk

    [...] Google Reader Gears Search – Uses Google Gears to search your posts. [...]

  19. 19 PARANDROID+ : 50多个增强Google Reader功能的Firefox扩展插件

    [...] Google Reader Gears Search – 用Google Gears 来搜索文章. [...]

  20. 20 FIREFOX GOD: 300+ Tools and Resources For Firefox

    [...] Google Reader Gears Search – Uses Google Gears to search your posts. [...]

  21. 21 Vitaminai Google Reader : nežinau.lt

    [...] ieškoti tik tose prenumeratose, kurias pasirinkau skaityti. Panašiausia į norimą rezultatą yra Google Reader Gears Search, bet ja nepatogu naudotis, nes reikia nuolat parsisiųsti visus straipsnius į kompiuterį. Jai [...]

  22. 22 Aggiungere la funzione di ricerca al GoogleReader | Davide Salerno

    [...] presenti nell’aggregatore anche quando non siete connessi dovete utilizzare quest’altro greasemonkey script che vi dà la possibilità di effettuare ricerche sugli ultimi 2000 elementi sincronizzati offline. [...]

  23. 23 Google Reader, Bloglines Beta, and Demo Girl All In The Same Post « Matt’s Cuppa

    [...] Yes, Google Reader finally added a search box. In exactly the same place as my Greasemonkey search script. I was going to try one against the other this morning, but I got sidetracked by this new [...]

  24. 24 Search blogs subscribed in Google Reader « Dong Liu

    [...] details about the latter option is described in Raúl’s blog. The offline function of Google Reader works for me, but the Greasemonkey search script halts [...]

  25. 25 Get Firefox Now » Great tools and plugins for Firefox

    [...] Google Reader Gears Search – Uses Google Gears to search your posts. [...]

  26. 26 Google Reader Extensions and Scripts For Firefox

    [...] Google Reader Gears Search – Uses Google Gears to search your posts. [...]

Dejar un comentario



About Raúl

Raúl Ochoa, a spaniard working for Tuenti in Madrid, Spain. More about me.

Subscribe to the feed

If you want to receive a notification when I update the website, you only have to add the feed to your reader, or submit your email address and I'll let you know.

Categories