googler 2.3 adds Google Site Search

googler

I have released googler 2.3 yesterday. As most TuxDiary readers are aware by now, it is a utility to google from the cmdline. The latest version extends that further by adding Google Site Search support so that you can search a single website using Google. googler users can now lookup Amazon for shopping or IMDB to check out how The Jungle Book is doing in the Box Office!

While it was possible to site search earlier using the site:website.domain keyword, the new option (-w) makes it integrated. If you initiate a new site search, subsequent searches from omniprompt for the same session search the same site. To switch to Google search (for a particular search) use the g omniprompt key.

Before we jump into some examples of site search, let’s check out what else this release brings:

  • Most of my collaborators use Zsh. I use Fish. When we thought of auto-completion scripts, it was intended for Zsh. However we ended up writing auto-completion scripts for Bash, Zsh and Fish. Now, you don’t need to remember the options if you use any of these shells.
  • All Google top level domains are now supported. Earlier googler supported fewer TLDs.
  • Time is shown for news search results to represent freshness of news. News snippets are removed.
  • Lost at the omniprompt? Just enter ? for detailed help on supported keys.
  • googler has moved to argparse from getopt. Makes it more flexible, support long options and much more.

Finally, here are the aliases I have added to my fish.config for googler:

# Amazon
alias buy=’python3 /usr/local/bin/googler -n 8 -w amazon.in’
# Google
alias g=’python3 /usr/local/bin/googler -n 8 -l en’
# Google News
alias news=’python3 /usr/local/bin/googler -n 8 -c in -l en -N’
# IMDB
alias i=’python3 /usr/local/bin/googler -n 4 -w imdb.com’
# Torrents
alias tor=’python3 /usr/local/bin/googler -n 8 -w torrentz.eu’
# TuxDiary
alias t=’python3 /usr/local/bin/googler -n 8 -w tuxdiary.com’
# Twitter
alias tw=’python3 /usr/local/bin/googler -n 8 -w twitter.com’
# Wikipedia
alias wiki=’python3 /usr/local/bin/googler -n 8 -w en.wikipedia.org’
# Word meanings
alias define=’python3 /usr/local/bin/googler -n 3 -l en define’

Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s