"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "README.md" between
googler-4.1.tar.gz and googler-4.2.tar.gz

About: googler is a command line tool to search Google (Web & News) from the terminal (requires Python).

README.md  (googler-4.1):README.md  (googler-4.2)
<h1 align="center"><img src="https://cdn.rawgit.com/jarun/googler/master/googler .svg" alt="googler" /></h1> <h1 align="center"><img src="https://cdn.rawgit.com/jarun/googler/master/googler .svg" alt="googler" /></h1>
<p align="center"> <p align="center">
<a href="https://github.com/jarun/googler/releases/latest"><img src="https://img .shields.io/github/release/jarun/googler.svg?maxAge=600" alt="Latest release" /> </a> <a href="https://github.com/jarun/googler/releases/latest"><img src="https://img .shields.io/github/release/jarun/googler.svg?maxAge=600" alt="Latest release" /> </a>
<a href="https://repology.org/project/googler/versions"><img src="https://repolo gy.org/badge/tiny-repos/googler.svg" alt="Availability"></a> <a href="https://repology.org/project/googler/versions"><img src="https://repolo gy.org/badge/tiny-repos/googler.svg" alt="Availability"></a>
<a href="https://github.com/jarun/googler/blob/master/LICENSE"><img src="https:/ <a href="https://github.com/jarun/googler/blob/master/LICENSE"><img src="https:/
/img.shields.io/badge/license-GPLv3-yellow.svg?maxAge=2592000" alt="License" />< /img.shields.io/badge/license-GPLv3-yellowgreen.svg?maxAge=2592000" alt="License
/a> " /></a>
<a href="https://circleci.com/gh/jarun/workflows/googler"><img src="https://img. <a href="https://github.com/jarun/googler/actions"><img src="https://github.com/
shields.io/circleci/project/github/jarun/googler.svg" alt="Build Status" /></a> jarun/googler/workflows/test/badge.svg?branch=master" alt="Build Status" /></a>
<a href="https://repl.it/github/jarun/googler"><img src="https://repl.it/badge/g ithub/jarun/googler?maxAge=2592000" alt="Repl.it" /></a> <a href="https://repl.it/github/jarun/googler"><img src="https://repl.it/badge/g ithub/jarun/googler?maxAge=2592000" alt="Repl.it" /></a>
</p> </p>
<p align="center"> <p align="center">
<a href="https://asciinema.org/a/85019"><img src="https://i.imgur.com/EbZof9q.pn g" alt="Asciicast" width="734"/></a> <a href="https://asciinema.org/a/85019"><img src="https://i.imgur.com/EbZof9q.pn g" alt="Asciicast" width="734"/></a>
</p> </p>
`googler` is a power tool to Google (Web & News) and Google Site Search from the command-line. It shows the title, URL and abstract for each result, which can b e directly opened in a browser from the terminal. Results are fetched in pages ( with page navigation). Supports sequential searches in a single `googler` instan ce. `googler` is a power tool to Google (Web & News) and Google Site Search from the command-line. It shows the title, URL and abstract for each result, which can b e directly opened in a browser from the terminal. Results are fetched in pages ( with page navigation). Supports sequential searches in a single `googler` instan ce.
`googler` was initially written to cater to headless servers without X. You can integrate it with a text-based browser. However, it has grown into a very handy and flexible utility that delivers much more. For example, fetch any number of r esults or start anywhere, limit search by any duration, define aliases to google search any number of websites, switch domains easily... all of this in a very c lean interface without ads or stray URLs. The shell completion scripts make sure you don't need to remember any options. `googler` was initially written to cater to headless servers without X. You can integrate it with a text-based browser. However, it has grown into a very handy and flexible utility that delivers much more. For example, fetch any number of r esults or start anywhere, limit search by any duration, define aliases to google search any number of websites, switch domains easily... all of this in a very c lean interface without ads or stray URLs. The shell completion scripts make sure you don't need to remember any options.
`googler` isn't affiliated to Google in any way. `googler` isn't affiliated to Google in any way.
Here are some usage examples:
1. Google **hello world**:
$ googler hello world
2. Fetch **15 results** updated within the last **14 months**, starting from the
**3<sup>rd</sup> result** for the keywords **jungle book** in **site** imdb.com
:
$ googler -n 15 -s 3 -t m14 -w imdb.com jungle book
Or instead of the last 14 months, look for results specifically between Apr
4, 2016 and Dec 31, 2016:
$ googler -n 15 -s 3 --from 04/04/2016 --to 12/31/2016 -w imdb.com jungl
e book
3. Read recent **news** on gadgets:
$ googler -N gadgets
4. Fetch results on IPL cricket from **Google India** server in **English**:
$ googler -c in -l en IPL cricket
5. Search for **videos** on PyCon 2020:
$ googler -V PyCon 2020
6. Search **quoted text**:
$ googler it\'s a \"beautiful world\" in spring
7. Search for a **specific file type**:
$ googler instrumental filetype:mp3
8. Disable **automatic spelling correction**, e.g. fetch results for `googler` i
nstead of `google`:
$ googler -x googler
9. **I'm feeling lucky** search:
$ googler -j leather jackets
10. **Website specific** search:
$ googler -w amazon.com -w ebay.com digital camera
Site specific search continues at omniprompt.
11. Positional arguments are joined (with delimiting whitespace) to form the fin
al query, so you can be creative with your aliases. For instance, always **exclu
de** seoarticlefactory.com from search results:
$ alias googler='googler " -site:seoarticlefactory.com"'
$ googler '<hugely popular keyword filled with SEO garbage>'
12. Alias to find **definitions of words**:
alias define='googler -n 2 define'
13. Look up `n`, `p`, `o`, `O`, `q`, `g keywords` or a result index at the **omn
iprompt**: as the omniprompt recognizes these keys or index strings as commands,
you need to prefix them with `g`, e.g.,
g n
g g keywords
g 1
14. Input and output **redirection**:
$ googler -C hello world < input > output
Note that `-C` is required to avoid printing control characters (for colored
output).
15. **Pipe** output:
$ googler -C hello world | tee output
16. Use a **custom color scheme**, e.g., a warm color scheme designed for Solari
zed Dark ([screenshot](https://i.imgur.com/6L8VlfS.png)):
$ googler --colors bjdxxy google
$ GOOGLER_COLORS=bjdxxy googler google
17. Tunnel traffic through an **HTTPS proxy**, e.g., a local Privoxy instance li
stening on port 8118:
$ googler --proxy localhost:8118 google
By default the environment variable `https_proxy` is used, if defined.
18. Quote multiple search keywords to auto-complete (using completion script):
$ googler 'hello w<TAB>
19. More **help**:
$ googler -h
$ man googler
More fun stuff you can try with `googler`: More fun stuff you can try with `googler`:
- [googler on the iPad](https://github.com/jarun/googler/wiki/googler-on-the-iPa d) - [googler on the iPad](https://github.com/jarun/googler/wiki/googler-on-the-iPa d)
- [Print content of results to terminal or listen to it](https://github.com/jaru n/googler/wiki/Print-content-of-results-to-terminal-or-listen-to-it) - [Print content of results to terminal or listen to it](https://github.com/jaru n/googler/wiki/Print-content-of-results-to-terminal-or-listen-to-it)
- [Terminal Reading Mode or Reader View](https://github.com/jarun/googler/wiki/T erminal-Reading-Mode-or-Reader-View) - [Terminal Reading Mode or Reader View](https://github.com/jarun/googler/wiki/T erminal-Reading-Mode-or-Reader-View)
- [Stream YouTube videos on desktop](https://github.com/jarun/googler/wiki/Strea m-YouTube-videos-on-desktop) - [Stream YouTube videos on desktop](https://github.com/jarun/googler/wiki/Searc h-and-stream-videos-from-the-terminal)
- [Search error on StackOverflow from terminal](https://github.com/jarun/googler /wiki/Search-error-on-StackOverflow-from-terminal) - [Search error on StackOverflow from terminal](https://github.com/jarun/googler /wiki/Search-error-on-StackOverflow-from-terminal)
*Love smart and efficient utilities? Explore [my repositories](https://github.co m/jarun?tab=repositories). Buy me a cup of coffee if they help you.* *Love smart and efficient utilities? Explore [my repositories](https://github.co m/jarun?tab=repositories). Buy me a cup of coffee if they help you.*
<p align="center"> <p align="center">
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RM LTQ76JSXJ4Q"><img src="https://img.shields.io/badge/donate-PayPal-1eb0fc.svg" al t="Donate via PayPal!" /></a> <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RM LTQ76JSXJ4Q"><img src="https://img.shields.io/badge/donate-PayPal-1eb0fc.svg" al t="Donate via PayPal!" /></a>
</p> </p>
### Table of contents ### Table of contents
skipping to change at line 55 skipping to change at line 147
- [Running standalone](#running-standalone) - [Running standalone](#running-standalone)
- [Downloading a single file](#downloading-a-single-file) - [Downloading a single file](#downloading-a-single-file)
- [Shell completion](#shell-completion) - [Shell completion](#shell-completion)
- [Usage](#usage) - [Usage](#usage)
- [Cmdline options](#cmdline-options) - [Cmdline options](#cmdline-options)
- [Configuration file](#configuration-file) - [Configuration file](#configuration-file)
- [googler @t](#googler-t) - [googler @t](#googler-t)
- [Text-based browser integration](#text-based-browser-integration) - [Text-based browser integration](#text-based-browser-integration)
- [Colors](#colors) - [Colors](#colors)
- [Domain-only URL](#domain-only-url) - [Domain-only URL](#domain-only-url)
- [Examples](#examples) - [Windows Subsystem for Linux (WSL)](#windows-subsystem-for-linux-wsl)
- [Troubleshooting](#troubleshooting) - [Troubleshooting](#troubleshooting)
- [Notes](#notes) - [Notes](#notes)
- [Contributions](#contributions) - [Contributions](#contributions)
- [Developers](#developers) - [Developers](#developers)
### Features ### Features
- Google Search, Google Site Search, Google News, Google Videos - Google Search, Google Site Search, Google News, Google Videos
- Fast and clean (no ads, stray URLs or clutter), custom color - Fast and clean (no ads, stray URLs or clutter), custom color
- Navigate result pages from omniprompt, open URLs in browser - Navigate result pages from omniprompt, open URLs in browser
skipping to change at line 140 skipping to change at line 232
`googler` is a standalone executable (and can run even on environments like Term ux). From the containing directory: `googler` is a standalone executable (and can run even on environments like Term ux). From the containing directory:
$ ./googler $ ./googler
#### Downloading a single file #### Downloading a single file
`googler` is a single standalone script, so you could download just a single fil e if you'd like to. `googler` is a single standalone script, so you could download just a single fil e if you'd like to.
To install the latest stable version, run To install the latest stable version, run
$ sudo curl -o /usr/local/bin/googler https://raw.githubusercontent.com/jaru n/googler/v4.1/googler && sudo chmod +x /usr/local/bin/googler $ sudo curl -o /usr/local/bin/googler https://raw.githubusercontent.com/jaru n/googler/v4.2/googler && sudo chmod +x /usr/local/bin/googler
You could then let googler upgrade itself by running You could then let googler upgrade itself by running
$ sudo googler -u $ sudo googler -u
Similarly, if you want to install from git master (*risky*), run Similarly, if you want to install from git master (*risky*), run
$ sudo curl -o /usr/local/bin/googler https://raw.githubusercontent.com/jaru n/googler/master/googler && sudo chmod +x /usr/local/bin/googler $ sudo curl -o /usr/local/bin/googler https://raw.githubusercontent.com/jaru n/googler/master/googler && sudo chmod +x /usr/local/bin/googler
and upgrade by running and upgrade by running
skipping to change at line 163 skipping to change at line 255
### Shell completion ### Shell completion
Search keyword and option completion scripts for Bash, Fish and Zsh can be found in respective subdirectories of [`auto-completion/`](auto-completion). Please r efer to your shell's manual for installation instructions. Search keyword and option completion scripts for Bash, Fish and Zsh can be found in respective subdirectories of [`auto-completion/`](auto-completion). Please r efer to your shell's manual for installation instructions.
### Usage ### Usage
#### Cmdline options #### Cmdline options
``` ```
usage: googler [-h] [-s N] [-n N] [-N] [-V] [-c TLD] [-l LANG] [-x] usage: googler [-h] [-s N] [-n N] [-N] [-V] [-c TLD] [-l LANG] [-x] [--colorize
[--colorize [{auto,always,never}]] [-C] [--colors COLORS] [-j] [{auto,always,never}]]
[-t dN] [--from FROM] [--to TO] [-w SITE] [--unfilter] [-C] [--colors COLORS] [-j] [-t dN] [--from FROM] [--to TO] [-w S
[-p PROXY] [--noua] [--notweak] [--json] [--url-handler UTIL] ITE] [--unfilter]
[--show-browser-logs] [--np] [-u] [--include-git] [-v] [-d] [-p PROXY] [--notweak] [--json] [--url-handler UTIL] [--show-brow
ser-logs] [--np] [-4]
[-6] [-u] [--include-git] [-v] [-d]
[KEYWORD [KEYWORD ...]] [KEYWORD [KEYWORD ...]]
Google from the command-line. Google from the command-line.
positional arguments: positional arguments:
KEYWORD search keywords KEYWORD search keywords
optional arguments: optional arguments:
-h, --help show this help message and exit -h, --help show this help message and exit
-s N, --start N start at the Nth result -s N, --start N start at the Nth result
-n N, --count N show N results (default 10) -n N, --count N show N results (default 10)
-N, --news show results from news section -N, --news show results from news section
-V, --videos show results from videos section -V, --videos show results from videos section
-c TLD, --tld TLD country-specific search with top-level domain .TLD, -c TLD, --tld TLD country-specific search with top-level domain .TLD, e.g.
e.g., 'in' for India , 'in' for India
-l LANG, --lang LANG display in language LANG -l LANG, --lang LANG display in language LANG
-x, --exact disable automatic spelling correction -x, --exact disable automatic spelling correction
--colorize [{auto,always,never}] --colorize [{auto,always,never}]
whether to colorize output; defaults to 'auto', which whether to colorize output; defaults to 'auto', which en
enables color when stdout is a tty device; using ables color when stdout
--colorize without an argument is equivalent to is a tty device; using --colorize without an argument is
equivalent to
--colorize=always --colorize=always
-C, --nocolor equivalent to --colorize=never -C, --nocolor equivalent to --colorize=never
--colors COLORS set output colors (see man page for details) --colors COLORS set output colors (see man page for details)
-j, --first, --lucky open the first result in web browser and exit -j, --first, --lucky open the first result in web browser and exit
-t dN, --time dN time limit search [h5 (5 hrs), d5 (5 days), w5 (5 -t dN, --time dN time limit search [h5 (5 hrs), d5 (5 days), w5 (5 weeks)
weeks), m5 (5 months), y5 (5 years)] , m5 (5 months), y5 (5
--from FROM starting date/month/year of date range; must use years)]
American date format with slashes, e.g., 2/24/2020, --from FROM starting date/month/year of date range; must use America
2/2020, 2020; can be used in conjuction with --to, n date format with
slashes, e.g., 2/24/2020, 2/2020, 2020; can be used in c
onjunction with --to,
and overrides -t, --time and overrides -t, --time
--to TO ending date/month/year of date range; see --from --to TO ending date/month/year of date range; see --from
-w SITE, --site SITE search a site using Google -w SITE, --site SITE search a site using Google
--unfilter do not omit similar results --unfilter do not omit similar results
-p PROXY, --proxy PROXY -p PROXY, --proxy PROXY
tunnel traffic through an HTTP proxy; PROXY is of the tunnel traffic through an HTTP proxy; PROXY is of the fo
form [http://][user:password@]proxyhost[:port] rm
--noua legacy option (no effect) [http://][user:password@]proxyhost[:port]
--notweak disable TCP optimizations and forced TLS 1.2 --notweak disable TCP optimizations and forced TLS 1.2
--json output in JSON format; implies --noprompt --json output in JSON format; implies --noprompt
--url-handler UTIL custom script or cli utility to open results --url-handler UTIL custom script or cli utility to open results
--show-browser-logs do not suppress browser output (stdout and stderr) --show-browser-logs do not suppress browser output (stdout and stderr)
--np, --noprompt search and exit, do not prompt --np, --noprompt search and exit, do not prompt
-4, --ipv4 only connect over IPv4 (by default, IPv4 is preferred bu
t IPv6 is used as a
fallback)
-6, --ipv6 only connect over IPv6
-u, --upgrade perform in-place self-upgrade -u, --upgrade perform in-place self-upgrade
--include-git when used with --upgrade, get latest git master --include-git when used with --upgrade, get latest git master
-v, --version show program's version number and exit -v, --version show program's version number and exit
-d, --debug enable debugging -d, --debug enable debugging
omniprompt keys: omniprompt keys:
n, p fetch the next or previous set of search results n, p fetch the next or previous set of search results
index open the result corresponding to index in browser index open the result corresponding to index in browser
f jump to the first page f jump to the first page
o [index|range|a ...] open space-separated result indices, numeric ranges o [index|range|a ...] open space-separated result indices, numeric ranges
skipping to change at line 338 skipping to change at line 428
- Bright colors (implemented as `\x1b[90m`–`\x1b[97m`) may not be available in a ll color-capable terminal emulators; - Bright colors (implemented as `\x1b[90m`–`\x1b[97m`) may not be available in a ll color-capable terminal emulators;
- Some terminal emulators draw bold text in bright colors instead; - Some terminal emulators draw bold text in bright colors instead;
- Some terminal emulators only distinguish between bold and bright colors via a default-off switch. - Some terminal emulators only distinguish between bold and bright colors via a default-off switch.
Please consult the manual of your terminal emulator as well as the [Wikipedia ar ticle](https://en.wikipedia.org/wiki/ANSI_escape_code) on ANSI escape sequences. Please consult the manual of your terminal emulator as well as the [Wikipedia ar ticle](https://en.wikipedia.org/wiki/ANSI_escape_code) on ANSI escape sequences.
#### Domain-only URL #### Domain-only URL
To show the domain names in search results instead of the expanded URL (and use lesser space), set the environment variable `DISABLE_URL_EXPANSION`. To show the domain names in search results instead of the expanded URL (and use lesser space), set the environment variable `DISABLE_URL_EXPANSION`.
### Examples #### Windows Subsystem for Linux (WSL)
1. Google **hello world**:
$ googler hello world
2. Fetch **15 results** updated within the last **14 months**, starting from the
**3<sup>rd</sup> result** for the keywords **jungle book** in **site** imdb.com
:
$ googler -n 15 -s 3 -t m14 -w imdb.com jungle book
3. Read recent **news** on gadgets:
$ googler -N gadgets
4. Fetch results on IPL cricket from **Google India** server in **English**:
$ googler -c in -l en IPL cricket
5. Search **quoted text**:
$ googler it\'s a \"beautiful world\" in spring
6. Search for a **specific file type**:
$ googler instrumental filetype:mp3
7. Disable **automatic spelling correction**, e.g. fetch results for `googler` i
nstead of `google`:
$ googler -x googler
8. **I'm feeling lucky** search:
$ googler -j leather jackets
9. **Website specific** search:
$ googler -w amazon.com -w ebay.com digital camera
Site specific search continues at omniprompt.
10. Alias to find **definitions of words**:
alias define='googler -n 2 define'
11. Look up `n`, `p`, `o`, `O`, `q`, `g keywords` or a result index at the **omn
iprompt**: as the omniprompt recognizes these keys or index strings as commands,
you need to prefix them with `g`, e.g.,
g n
g g keywords
g 1
12. Input and output **redirection**:
$ googler -C hello world < input > output
Note that `-C` is required to avoid printing control characters (for colored
output).
13. **Pipe** output:
$ googler -C hello world | tee output
14. Use a **custom color scheme**, e.g., a warm color scheme designed for Solari
zed Dark ([screenshot](https://i.imgur.com/6L8VlfS.png)):
$ googler --colors bjdxxy google
$ GOOGLER_COLORS=bjdxxy googler google
15. Tunnel traffic through an **HTTPS proxy**, e.g., a local Privoxy instance li
stening on port 8118:
$ googler --proxy localhost:8118 google
By default the environment variable `https_proxy` is used, if defined.
16. Quote multiple search keywords to auto-complete (using completion script): On WSL, GUI browsers on the Windows side cannot be detected by default. You need
to explicitly set the `BROWSER` environment variable to the path of a Windows e
$ googler 'hello w<TAB> xecutable. For instance, you can put the following in your shell's rc:
17. More **help**: $ export BROWSER='/mnt/c/Program Files (x86)/Google/Chrome/Application/chrom
e.exe'
$ googler -h
$ man googler
### Troubleshooting ### Troubleshooting
1. In some instances `googler` may show fewer number of results than you expect, e.g., if you fetch a single result (`-n 1`) it may not show any results. The re ason is Google shows some Google service (e.g. Youtube) results, map locations e tc. depending on your geographical data, which `googler` tries to omit. In some cases Google (the web-service) doesn't show exactly 10 results (default) on a se arch. We chose to omit these results as far as possible. While this can be fixed , it would need more processing (and more time). You can just navigate forward t o fetch the next set of results. 1. In some instances `googler` may show fewer number of results than you expect, e.g., if you fetch a single result (`-n 1`) it may not show any results. The re ason is Google shows some Google service (e.g. Youtube) results, map locations e tc. depending on your geographical data, which `googler` tries to omit. In some cases Google (the web-service) doesn't show exactly 10 results (default) on a se arch. We chose to omit these results as far as possible. While this can be fixed , it would need more processing (and more time). You can just navigate forward t o fetch the next set of results.
2. By default `googler` applies some TCP optimizations and forces TLS 1.2 (on Py thon 3.4 and above). If you are facing connection issues, try disabling both usi ng the `--notweak` switch. 2. By default `googler` applies some TCP optimizations and forces TLS 1.2 (on Py thon 3.4 and above). If you are facing connection issues, try disabling both usi ng the `--notweak` switch.
3. Google News service is not available if the language is `dk` (Denmark), `fi` (Finland) or `is` (Iceland). Use `-l en`. Please refer to #187 for more informat ion. 3. Google News service is not available if the language is `dk` (Denmark), `fi` (Finland) or `is` (Iceland). Use `-l en`. Please refer to #187 for more informat ion.
4. Some users have reported problems with a colored omniprompt (refer to issue [ #203](https://github.com/jarun/googler/issues/203)) with iTerm2 on macOS. To for ce a plain omniprompt: 4. Some users have reported problems with a colored omniprompt (refer to issue [ #203](https://github.com/jarun/googler/issues/203)) with iTerm2 on macOS. To for ce a plain omniprompt:
 End of changes. 14 change blocks. 
108 lines changed or deleted 145 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)