Giter Site home page Giter Site logo

lucasallan / google Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kerrick/google

0.0 0.0 0.0 624 KB

A ruby gem to give you the power of Google Search in your command line.

Home Page: http://kerrick.github.com/google/

License: MIT License

Ruby 100.00%

google's Introduction

google

The power of Google Search in your command line.

The CLI displays results from the Google Web Search API, allows you to page through the results, and choose a page to view, all without leaving the command line.

Hosted on RubyGems.

Screenshot of google in action!

Installation

gem install google # Requires Ruby 1.9

Usage Examples

Typing google --help will list all the available commands. They are also listed here.

The google gem is a simple tool to search Gooogle with via a CLI.
Usage:
    google [options] "my search query string here"
where [options] are:
        --page, -p <i>:   Start by showing the <i>th result page. (Default: 1)
        --size, -s <i>:   Show <i> results on each SERP. Must be between 1 and 8. (Default: 4)
      --result, -r <i>:   Skip the SERP and show the <i>th result.
           --lucky, -l:   I'm feeling lucky! Skip the SERP and show the first result. (Alias to --result 1)
  --no-readability, -e:   Filter the results through readability to get rid of extra content. (Default: true)
     --no-markdown, -m:   Change the results from raw HTML to markdown. (Default: true)
         --version, -v:   Print the version and exit.
            --help, -h:   Show this information and exit.

I'm Feeling Lucky into Less

google -l 'how to install nvidia drivers debian squeeze' | less

Search on a single site

google 'site:randsinrepose.com NADD'

Vanity Search

google '"Kerrick Long" -inurl:kerrick -inurl:kerricklong'

Features

  • You have access to all the search operators you've come to know and love in Google Search.

  • If using the --lucky or --result flags, you can pipe the results into any other unix command.

  • Results are filtered through Readability, so you only get the relevant content. (Shoutout to Ruby Readability!)

  • Results are shown in markdown for a good balance between legibility and document heirarchy. (Shoutout to reverse_markdown!)

  • Results pages are formatted to look like a Google SERP, including colors, domains, descriptions, and bold search matches. (Shoutout to formatador!)

  • You can pipe a result into another unix command! At the prompt, type the number of the result, followed by a pipe as normal. Note that utilities such as less and more that need to control the display don't work.

For example,

Enter N or P for pagination, E or Q to quit, or a number to see that result.
> 3 | espeak -a 200 -v en-us

Supported Ruby Versions

This library has only been tested against Ruby 1.9.3. Other versions might be supported, but they haven't been tested.

Notable Forks

  • 21croissants/google: Google Search in your command line, then copy a search result link to your clipboard (OS X, Linux, Win)

Acknowledgements

This gem is Powered by Google.

Copyright

Copyright (c) 2012 Kerrick Long. See LICENSE for details.

Dependencies

google's People

Contributors

kerrick avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.