GNUGOL

A command line text only web search client

Table of Contents

About Gnugol

Gnugol is a command line web search client, written in C, that can make searching and utilizing the web more efficient.

Gnugol is fast

By eliminating all the extra stuff most search engines return for their results and returning the results in a simple format, you get just the answers you need for the tool you are using. As gnugol is written in C, startup time is vastly reduced verses something written in a higher level language, such as python.

Gnugol is smart

The basics of most searching is keyword based. All search engines return standardized results in the form of the title of a page, a relevant snippet from your search, and a link to the page. (Almost) everything else is fluff. Why not get it in a form you can read in the tool of your choice, whether that be plain text, basic html, org, mdwn, or wiki formats?

Gnugol is small

Presently the command line binary weighs in at less than 60k stripped - admittedly with a huge dependence on the curl library and a much smaller one on the jansson library.

Gnugol is simple

The default output of gnugol is spartan, to say the least. While it can be extensively customized, the motto is "just the results, please", and be damned to everything else.

Gnugol is flexible

As a command line utility, supplied with easy to understand source code, it is possible to (eventually) make gnugol have more features that are common on the web browser side.

Gnugol is portable

Well, I hope one day it will be. I am trying hard to use techniques that will result in a small memory footprint.

Gnugol integrates with emacs

Supplied in the elisp directory is an interface to emacs, gnugol.el

Use Cases

Command Line

The simplest way to use gnugol is on the command line. <shell:gnugol -o text in the beginning was the command line>

Emacs

Emacs has an incredibly powerful outliner called org-mode that uses plain text and a wiki-like format for various url forms. It does not grok html natively, instead using a variety of markdown-like mechanisms to make it possible to view your personal database of projects within emacs. Put lisp/gnugol.el into your .emacs.d directory and do a (require 'gnugol)

<shell:gnugol -o org in the beginning was the command line>

Scripts for the command line

If you are like me, you spend large portions of your day in front of a very large terminal or editor window, working.

It's a difficult context switch to make, from, in my case, green on black text, to the blazing black on white of most web sites. Enter gnugol!

gnugol -o html carpal tunnel syndrome | elinks

I make things even simpler for myself by having a set of shell scripts to make my typing even less. In the above case I have a simple shell script, "gl" which looks like this:

#!/bin/sh
# Simple shortcut for gnugol to elinks

gnugol -o html "$*" | elinks

I have a similar one (ge) to bring up the results in emacs:

#!/bin/sh
#Simple shortcut for gnugol to bring up emacs
TEMP=/tmp/gnugol.$$.org
gnugol -o org "$*" >> $TEMP
emacsclient $TEMP
rm -f $TEMP

One of these days I'll get around to something more elaborate.

For the blind

Navigating today's internet is an increasingly difficult prospect for those with disabilities such as blindness. Using a speech synthesiser to navigate a world with hundreds of irrelevant graphics and urls on a page is very difficult to say the least.

Gnugol uses only the bare minimum of markup and can probably be interfaced with a speech synthesizer with little difficulty. There is preliminary SSML support.

See also: Trust Relationships

For integration with other tools

Other Resources

FAQ

For Developers

Tests

Test CGI search (non-functional at present)

Where to get it?

Gnugol is being maintained in a repository on github.

Author: Dave Täht

Date: <2010-12-21 Tue>

HTML generated by org-mode 7.4 in emacs 23