From 1854859e5e9f914c17adc51c7dc7953f3f1d69ab Mon Sep 17 00:00:00 2001 From: LinuxBars Date: Mon, 19 Sep 2016 19:46:09 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... NOW YOU CAN GOOGLE FROM LINUX TERMINAL.md | 130 ------------------ ... NOW YOU CAN GOOGLE FROM LINUX TERMINAL.md | 128 +++++++++++++++++ 2 files changed, 128 insertions(+), 130 deletions(-) delete mode 100644 sources/tech/20160915 GOOGLER: NOW YOU CAN GOOGLE FROM LINUX TERMINAL.md create mode 100644 translated/tech/20160915 GOOGLER: NOW YOU CAN GOOGLE FROM LINUX TERMINAL.md diff --git a/sources/tech/20160915 GOOGLER: NOW YOU CAN GOOGLE FROM LINUX TERMINAL.md b/sources/tech/20160915 GOOGLER: NOW YOU CAN GOOGLE FROM LINUX TERMINAL.md deleted file mode 100644 index e4ff31e0c4..0000000000 --- a/sources/tech/20160915 GOOGLER: NOW YOU CAN GOOGLE FROM LINUX TERMINAL.md +++ /dev/null @@ -1,130 +0,0 @@ -LinuxBars 翻译认领 -GOOGLER: NOW YOU CAN GOOGLE FROM LINUX TERMINAL! -==== - -![](https://itsfoss.com/wp-content/uploads/2016/09/google-from-linux-terminal.jpg) - -A quick question: What do you do every day? Of course, a lot of things. But I can tell one thing, you search on Google almost every day (if not every day). Am I right? - -Now, if you are a Linux user (which I’m guessing you are) here’s another question: wouldn’t it be nice if you can Google without even leaving the terminal? Without even firing up a Browser window? - -If you are a *nix enthusiast and also one of those people who just love the view of the terminal, I know your answer is – Yes. And I think, the rest of you will also like the nifty little tool I’m going to introduce today. It’s called Googler! - -### GOOGLER: GOOGLE IN YOUR LINUX TERMINAL - -Googler is a straightforward command-line utility for Google-ing right from your terminal window. Googler mainly supports three types of Google Searches: - -- Google Search: Simple Google searching, equivalent to searching on Google homepage. -- Google News Search: Google searching for News, equivalent to searching on Google News. -- Google Site Search: Google searching for results from a specific site. - -Googler shows the search results with the title, URL and page excerpt. The search results can be opened directly in the browser with only a couple of keystrokes. - -![](https://itsfoss.com/wp-content/uploads/2016/09/googler-1.png) - -### INSTALLATION ON UBUNTU - -Let’s go through the installation process first. - -At first make sure you have python version 3.3 or later using this command: - -``` -python3 --version -``` - -If not, upgrade it. Googler requires python 3.3+ for running. - -Though Googler is yet not available through package repository on Ubuntu, we can easily install it from the GitHub repository. All we have to do is run the following commands: - -``` -cd /tmp -git clone https://github.com/jarun/googler.git -cd googler -sudo make install -cd auto-completion/bash/ -sudo cp googler-completion.bash /etc/bash_completion.d/ -``` - -And that’s it. Googler is installed along with command autocompletion feature. - -### FEATURES & BASIC USAGE - -If we go through all its features, Googler is actually quite powerful a tool. Some of the main features are: - -Interactive Interface: Run the following command in terminal: - -``` -googler -``` - -The interactive interface will be opened. The developer of Googler, Arun [Prakash Jana][1] calls it the omniprompt. You can enter ? for available commands on omniprompt. - -![](https://itsfoss.com/wp-content/uploads/2016/09/googler-2.png) - -From the omniprompt, enter any search phrases to initiate the search. You can then enter n or p to navigate next or previous page of search results. - -To open any search result in a browser window, just enter the index number of that result. Or you can open the search page itself by entering o . - -- News Search: If you want to search News, start googler with the N optional argument: - -``` -googler -N -``` - -The subsequent omniprompt will fetch results from Google News. - -- Site Search: If you want to search pages from a specific site, run googler with w {domain} argument: - -``` -googler -w itsfoss.com -``` - -The subsequent omniprompt with fetch results only from It’s FOSS blog! - -- Manual Page: Run the following command for Googler manual page equipped with various examples: - -``` -man googler -``` - -- Google country/domain specific search: - -``` -googler -c in "hello world" -``` - -The above example command will open search results from Google’s Indian domain (in for India). - -- Filter search results by duration and language preference. -- Google search keywords support, such as: site:example.com or filetype:pdf etc. -- HTTPS proxy support. -- Shell commands autocomplete. -- Disable automatic spelling correction. - -There are much more. You can twist Googler to suit your needs. - -Googler can also be integrated with a text-based browser ( like – [elinks][2], [links][3], [lynx][4], w3m etc.), so that you wouldn’t even need to leave the terminal for browsing web pages. The instructions can be found on the [GitHub project page of Googler][5]. - -If you want a graphical demonstration of Googler’s various features, feel free to check the terminal recording attached to the GitHub project page : [jarun/googler v2.7 quick demo][6]. - -### THOUGHTS ON GOOGLER? - -Though Googler might not feel necessary or desired to everybody, for someone who doesn’t want to open the browser just for searching on google or simply want to spend as much as time possible on the terminal window, it is a great tool indeed. What do you think? - --------------------------------------------------------------------------------- - -via: http://linoxide.com/firewall/pfsense-setup-basic-configuration/ - -作者:[Munif Tanjim][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/munif/ -[1]: https://github.com/jarun -[2]: http://elinks.or.cz/ -[3]: http://links.twibright.com/ -[4]: http://lynx.browser.org/ -[5]: https://github.com/jarun/googler#faq -[6]: https://asciinema.org/a/85019 diff --git a/translated/tech/20160915 GOOGLER: NOW YOU CAN GOOGLE FROM LINUX TERMINAL.md b/translated/tech/20160915 GOOGLER: NOW YOU CAN GOOGLE FROM LINUX TERMINAL.md new file mode 100644 index 0000000000..a5e7e5015c --- /dev/null +++ b/translated/tech/20160915 GOOGLER: NOW YOU CAN GOOGLE FROM LINUX TERMINAL.md @@ -0,0 +1,128 @@ +Googler:现在可以 Linux 终端下进行 Google 搜索了! +============================================ + +![](https://itsfoss.com/wp-content/uploads/2016/09/google-from-linux-terminal.jpg) + +一个小问题:你每天做什么事?当然了,好多事情,但是我可以指出一件事,你几乎每天(如果不是每天)都会用 Google 搜索,我说的对吗? + +现在,如果你是一位 Linux 用户(我猜你也是),这里有另外一个问题:如果你甚至不用离开终端就可以进行 Google 搜索那岂不是相当棒?甚至不用打开一个浏览器窗口? + +如果你是一位类 Unix 系统的狂热者而且也是喜欢终端界面的人,我知道你的答案是肯定的,而且我认为,接下来你也将喜欢山我今天将要介绍的这个漂亮的小工具。他被称做 Googler。 + + +### Googler:在你 linux 终端下的 google + +Googler 是一个简单的命令行工具用于直接在命令行窗口中进行 google 搜索,Googler 主要支持三种类型的 Google 搜索: + +- Google 搜索:简单的 Google 搜索,和在 Google 主页搜索是等效的。 +- Google 新闻搜索:Google 新闻搜索,和在 Google News 中的搜索一样。 +- Google 站点搜索:Google 从一个特定的网站搜索结果。 + +Googler 用标题,链接和网页摘要来显示搜索结果。搜索出来的结果可以仅通过两个按键就可以在浏览器里面直接打开。 + +![](https://itsfoss.com/wp-content/uploads/2016/09/googler-1.png) + +### 在 Ubuntu 下安装 Googler + +先让我们进行软件的安装 + +首先确保你的 python 版本大于等于3.3,可以用以下命令查看。 + +``` +python3 --version +``` + +如果不是的话,就更新一下。Googler 要求 python 版本 3.3 及以上运行。 + +虽然 Googler 现在还不能在 Ununtu 的软件库中找到,我们可以很容易地从 GitHub 仓库中安装它。我们需要做的就是运行以下命令: + +``` +cd /tmp +git clone https://github.com/jarun/googler.git +cd googler +sudo make install +cd auto-completion/bash/ +sudo cp googler-completion.bash /etc/bash_completion.d/ +``` + +这样 Googler 就带着命令自动完成特性安装完毕了。 + +### 特点&基本用法 + +如果我们快速浏览它所有的特点,我们会发现 Googler 实际上是一个十分强大的工具,他的一些主要特点就是: + +交互界面:在终端下运行以下命令 + +``` +googler +``` + +交互界面就会被打开,Googler 的开发者,Arun Prakash Jana 称之为提示符,你可以输入?去寻找可用的命令参数 +![](https://itsfoss.com/wp-content/uploads/2016/09/googler-2.png) + +在提示符处,输入任何搜索词汇关键字去开始搜索,然后你可以输入n或者p去导航到搜索结果的后一页和前一页。 + +为了在浏览器窗口中打开任何搜索结果,直接输入搜索结果的编号,或者你可以输入 o 命令来打开搜索到的网页。 +- 新闻搜索:如果你想去搜索新闻,直接以N参数启动 Googler: + +``` +googler -N +``` + +随后的提示符将会从 Google News 抓取结果。 + +- 站点搜索:如果你想从某个特定的站点进行搜索,以w【域名】参数启动 Googler: + +``` +googler -w itsfoss.com +``` + +随后的提示符会只从这个博客中抓取结果! + +- 手册页:运行以下命令去查看 Googler 的带着各种用例的手册页: + +``` +man googler +``` + +- Google 领域搜索引擎: + +``` +googler -c in "hello world" +``` + +上面的示例命令将会开始从 Google 的印度域名搜索结果(in 代表印度) + +- 通过时间和语言偏好来过滤搜索结果 +- 支持 Google 查询关键字,例如:site:example.com 或者 filetype:pdf 等等 +- 支持 HTTPS 代理 +- Shell 命令自动补全 +- 禁用自动拼写纠正 + +这里还有更多特性。你可以用 Googler 去满足你的需要。 + +Googler也可以和一些基于文本的浏览器整合在一起 ( 例如 – [elinks][2], [links][3], [lynx][4], w3m 等), 所以你甚至都不用离开终端去浏览网页。在 Googler 的 GitHub 工程页可以找到指导。 [Googler 的 GitHub 项目主页][5]. + +如果你想看一下 Googler 不同的特性的视频演示,你可以随意查看GitHub工程页附带的终端记录演示页: [jarun/googler v2.7 quick demo][6]. + +### 对于 Googler 的看法? + +尽管 googler 可能并不是对每个人都是必要和渴望的,对于一些不想打开浏览器进行 google 搜索或者仅仅是想花费尽可能多的时间在终端窗口上的人来说,这是一个很棒的工具。你认为呢? + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/firewall/pfsense-setup-basic-configuration/ + +作者:[Munif Tanjim][a] +译者:[LinuxBars](https://github.com/LinuxBars) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/munif/ +[1]: https://github.com/jarun +[2]: http://elinks.or.cz/ +[3]: http://links.twibright.com/ +[4]: http://lynx.browser.org/ +[5]: https://github.com/jarun/googler#faq +[6]: https://asciinema.org/a/85019