Brian's Waste of Time

Mon, 27 Jun 2005

Command Line Google, 2.0

Just updated my google command line script to remove the dependency on the GPL'd Ruby/Google, as well as any other external libraries. All it needs now is a recent version (I am using 1.8.2) of ruby =)

 
brianm@kite:~$ google -h
Usage: google [options] query string which will be concatenated

  Options:
    -i, --start NUMBER               Start index for results
    -m, --max NUMBER                 Max number of results to show
    -f, --[no-]filter                Activates or deactivates automatic results filtering
    -r, --restrict VALUE             Restricts the search
    -a, --[no-]safe                  Enable or disable (default disabled) filtering of adult content
    -1, --lucky                      I'm feeling lucky
    -H, --header                     Print field header on ouput (default disabled)
    -s, --snippet                    Display result snippet in output
    -t, --title                      Display result title in output
    -u, --[no-]url                   Show or hide result url in output

    -h, --help                       Show this message

Requires Ruby 1.8.1 and Ruby/Google ( http://www.caliban.org/ruby/ruby-google.shtml )
You can obtain a (free!) google key from http://www.google.com/apis/
exit
brianm@kite:~$   

Have fun!

writebacks...

Brian McCallister

Still works...
google -t --no-url -1 '"Best Programming Language"'

Garrett Rooney

First bug report...
If you removed the dependency on Ruby/Google, why does the help message still say it's required? ;-)

Brian McCallister

Docs are always last
bacause I didna update the docs =)

Brian McCallister


Fixed!

mAriuZ

you need soap4ruby
sudo apt-get install soap4r or else you have this error /usr/bin/google:78:in `require': No such file to load -- soap/wsdlDriver (LoadError) from /usr/bin/google:78

Brian McCallister

Docs are always last
I thought soap4r was installed by default with ruby 1.8.2 -- I am sure I didn't install it myself. I wonder if Debian split everything up again as they are wont to do =(

comment...

 
Name:
URL/Email: [http://... or mailto:you@wherever] (optional)
Title: (optional)
Spam Guard, translate l33t to English: (hint, it's an Australian animal, plural form)
Comments:
Save my Name and URL/Email for next time