Googler features
- Google Search, Google Site Search, Google News, Google Videos.
- Fast and clean interface with no ads or stray URLs.
- Each search result can be opened from the omniprompt (i.e. the googler prompt), without re-running googler every time. Meaning – you can perform new searches without leaving googlr.
- Open URLs in the default browser.
- Integrate Googler in your Text-browser.
- Open the first search result directly in the browser (as in “I’m feeling lucky” feature).
- Fetch any number of results and the start at nth result.
- Supports Google search keywords (Eg. site:ostechnix.com, filetype:pdf).
- Safe search support (i.e. excluding adult sites).
- HTTPS proxy, User Agent, TLS 1.2 (default) support.
- Filter search results by duration, domain, country and language.
- Switch from one Domain to another easily.
- Define aliases to google search any number of websites.
- You can disable automatic spelling correction to search for exact search terms.
- Lightweight and requires minimal dependencies.
- Free and open source!!
Install Googler On Linux
Googler can be installed in multiple ways. Make sure you have installed Python 3.5 or later. And xsel or xclip or termux-clipboard-set to copy URL into the clipboard. These packages are mostly comes pre-installed. Just in case if they are not installed already,, you can install them using your distribution’s package manager. For example on Debian and Ubuntu, the prerequisites can be installed using command:
1. Install latest Googler standalone version
This is the easiest and recommended way to install Googler on Unix-like operating systems.
Download the latest available Googler version:
Make it executable:
Done!
You can update to the latest version at any time using command:
Basic Google Search using Googler
Open your Terminal and type “googler” followed by your search term.
For example, let me search for the term – “ostechnix“.
You will get results related to “ostechnix” keyword.
OPEN WEB PAGES IN BROWSER
As you can see in the above output, I got six results and each result has an index number (or prefix number). Just type the number and hit ENTER to open the respective page in your default web browser. For example, if you type number 3, the third page from the result will open in the browser. It is that simple!
NAVIGATE THROUGH SEARCH RESULTS
To go to the next set of search results, simply press the letter n. Similarly, you can go to previous set of results by pressing p. Memorize it like – n for next and p for previous. To go the first page of google search results instantly from any page, press f.
SEARCHING FOR NEW KEYWORDS
To search for a new keyword, you don’t have to exit and re-run googler. We can perform non-stop searches without exiting Googler. Just type the new keyword in the omniprompt (i.e. googler prompt) and hit ENTER.
As you can see, I am searching for a new keyword – linux.
COPY URLS TO CLIPBOARD
We can copy a specific URL from the result to clipboard by pressing the letter c followed by the index number of the respective URL. Please mind the space between ‘c’ and the index number.
Example:
Here, we use c for copy and 3 is the index number. Hence the third page from the search results will be copied to clipboard. Please remember – you must have installed any one of the following utilities to use this feature.
- xclip
- xsel
- termux-clipboard-set
Exit Googler
To exit from Googler and return back to Terminal,
- press q and hit ENTER,
- or press ENTER twice,
- or press Ctrl+d.
These search tips are just enough in most cases. If you’d like to some advanced google search tips, read on.
Some advanced Google search tips
Googler supports all google keyword functionalities to get exact and precise results quickly and easily. Here I have included some of advanced Google search tips that I use from time to time.
FILTER RESULTS BY WEBSITE (SITE-SPECIFIC SEARCH)
The following command will get you the results for the search term arch linux from www.ostechnix.com blog only.
Or,
See? I am getting the results only from ostechnix.com site.
LIST SIMILAR WEBSITES
This can be useful when you want to find all similar sites that shares a common niche.
SEARCH FOR QUOTED TEXT
At times you might want to search for some exact texts, for example song lyrics or quotes of a famous author. If so, just mention them inside quotes like below.
SEARCH FOR SPECIFIC FILE TYPE
This tip will be useful when searching for a specific type of a file to download, for example a song, video, movie or text or pdf file.
The above command will fetch results related to Blockchain documents in pdf format.
FIND DEFINITIONS OF WORDS
Want to learn the definition of a word (Eg. acumen) from various online resources? Here you go!
FETCH SPECIFIC NUMBER OF RESULTS
By default, Googler will display 10 results. You can change this behaviour using n flag like below. The following command will only fetch 3 resultsfor the given search query.
DISPLAY RESULTS STARTING FROM NTHRESULT
The following example will fetch the results starting from the 5th result for the keyword ostechnix:
DISPLAY RESULTS WITHIN A SPECIFIC TIME SPAN
Fetch 10 results updated within the last 5 months, starting from the 3rd result for the keyword linux in ostechnix.com site:
FETCH RESULTS FROM GOOGLE NEWS SECTION
The following command will fetch results related to “Arch linux” from news.google.com section.
FETCH COUNTRY-SPECIFIC RESULTS
You might have noticed that when you search something on google, you will get the results based on the country where you live. For example if you live in India, you will get results from Google India server.
If you want Googler to fetch search results exclusively from a certain country or region, use -c flag.
This will return results from Google India server for best smartphone query.
FETCH LANGUAGE-SPECIFIC RESULTS
Like country-specific results, we can return language-specific results using -l flag.
This command will fetch results related to arthashatra including Tamil web pages.
DISABLE AUTOMATIC SPELLING CORRECTION
When we search specific terms, the Google will display the spelling suggestions (starting with a message Did you mean..), especially for technical and medical related search terms. If you want to disable this spell check feature, use -x flag.
I’M FEELING LUCKY SEARCH
As you already know, the Google’s homepage includes a button labeled “I’m Feeling Lucky” below the search bar. When we type a search query and click this button, we will be taken directly to the first search result, bypassing the search engine results page.
Googler has an option to do this from command line. To perform “I’m Feeling Lucky” search, use -j flag followed by your search term as shown below.
DISPLAY SITE INFORMATION
To get the information of a website/blog, run:
EXCLUDE ADULT WEBSITES FROM THE SEARCH RESULTS
To search for “sex education” material without returning adult sites, use:
FETCH SEARCH RESULTS THAT CONTAINS A SPECIFIC TERM IN THE PAGE TITLE OR URL
This will return all results that contains the word linux in the title from ostechnix.com.
Similarly, we can limit the results to those with all of the query words in the URL.
PIPE SEARCH RESULTS TO A FILE
It is one of my favorite Google search tip. I have a habit of saving the results along with URLs in a text file when searching for a specific topic. This way I can refer the results later. To me, It is kind of offline bookmarking!
The above command will search for Python and save all the search results in a text file called tutorial.txt in the current working directory.
Simplify Google search with aliases
This feature is for the lazy users! Googler offers many website search aliases for many popular websites including Amazon, Arch Linux wiki, BBC, CNN, eBay, Facebook, Google search, GitHub, HackerNews, IMDB, LinkedIn, National Geographic, MIT OpenCourseWare, Python documentation, Quora, Reddit, Stack Overflow, Twitter, Ubuntu forums, Wikipedia and a lot more.
For example, to search something on Arch Wiki, simply run:
Here, @aw is the alias for ArchWiki site. “install arch linux” is the keyword.
To enable this feature, download the googler @t add on and enable it like below.
You can also add your own aliases. For example, I have created an alias named @ostech for ostechnix.com blog.
To search from ostechnix.com, I simply run:
Add your aliases to ~/.bashrc file to make it permanent.
Refer the following guide to learn to use aliases in Linux.
Comments
Post a Comment