<commit_before>#+TITLE:     GNUGOL
#+AUTHOR:    <NAME>
#+EMAIL:     d at taht.net
#+DATE:      <2010-12-21 Tue>
#+LANGUAGE:  en
#+TEXT:      Searching the Web in Plain Text
#+DESCRIPTION: GNUGOL - an org-mode compatible search client
#+OPTIONS:   H:1 num:nil todo:nil toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t TeX:t LaTeX:nil skip:nil d:nil tags:not-in-toc
#+INFOJS_OPT: view:nil toc:t ltoc:t mouse:underline buttons:0 path:org-info.js
#+LINK_UP:
#+LINK_HOME: 
#+STYLE:    <link rel="stylesheet" type="text/css" href="worg.css" />
#+STYLE:    <script type="text/javascript" src="org-info.js"> 
#+STARTUP: overview hideblocks
* 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, plain html, or plain org or wiki formats?
** Gnugol is small
   Presently the command line binary weighs in at less than 40k 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 --text in the beginning was the command line]]
** Emacs 
   Emacs has an incredibly powerful outliner called [[http://www.orgmode.org][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. 

[[shell:gnugol --org in the beginning was the command line]] 
*** Search: in the beginning was the command line
**** [[http://www.cryptonomicon.com/beginning.html][In the Beginning was the Command Line - CRYPTONOMICON]]
     A history of operating systems, by <NAME>, the author of such novels as Snow Crash, The Diamond Age and Zodiac.
**** [[http://artlung.com/smorgasborg/C_R_Y_P_T_O_N_O_M_I_C_O_N.shtml]["In the Beginning Was The Command Line" - by <NAME> ]]
     In the Beginning was the Command Line. by <NAME>. About twenty years ago Jobs and Wozniak, the founders of Apple, came up with the very strange 
**** [[http://en.wikipedia.org/wiki/In_the_Beginning..._Was_the_Command_Line][In the Beginning Was the Command Line - Wikipedia, the free ]]
     In the Beginning Was the Command Line is an essay by <NAME> which was originally published online in 1999 and later made available in book form 
**** [[http://www.amazon.com/Beginning-was-Command-Line-Neal-Stephenson/dp/0380815931][Amazon.com: In the Beginningwas the Command Line (9780380815937 ]]
     That aside, "In the Beginning Was the Command Line" should be required reading for anyone who a) regularly uses a personal computer b) has expressed an 
**** [[http://www.sindominio.net/metabolik/alephandria/txt/stephenson_at_the_beginning.pdf][In the Beginning was the Command Line]]
     In the Beginning was the Command Line. <NAME>. June 25, 2004. 1 Introduction. About twenty years ago Jobs and Wozniak, the founders of Apple, 

     (The interesting thing to me about this query was that only buried deep within wikipedia was the link to the updated, annotated version of “[[http://garote.bdmonkeys.net/commandline/index.html][In the beginning was the command line]]”, which is what I was searching for in the first place). 

     You can also use gnugol to output results directly into emacs's w3 browser or any other browser, within emacs, as per the below.

     This website and documentation for gnugol are all managed as org-mode files.
** For the command line guys
   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 --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:
#+INCLUDE: "../src/scripts/gl" src sh
I have a similar one (ge) to bring up the results in emacs:
#+INCLUDE: "../src/scripts/ge" src sh
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: [[file:trust.org][Trust Relationships]]
** For integration with other tools
* Other Resources
** [[file:faq.org][FAQ]]
** [[file:history.org][History]]
** [[file:gnugol.odp][2008 Openoffice presentation on gnugol and gnugold]]
** [[file:bugs.org][Bugs]]
** [[file:gnugold.org][Gnugold query router]]
* Tests
** [[file:search.org][Test CGI search]]
* Where to get it?
Gnugol is being maintained in a repository on [[https://github.com/dtaht/Gnugol][github]]. <commit_msg>fixed search link<commit_after>#+TITLE:     GNUGOL
#+AUTHOR:    <NAME>
#+EMAIL:     d at taht.net
#+DATE:      <2010-12-21 Tue>
#+LANGUAGE:  en
#+TEXT:      Searching the Web in Plain Text
#+DESCRIPTION: GNUGOL - an org-mode compatible search client
#+OPTIONS:   H:1 num:nil todo:nil toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t TeX:t LaTeX:nil skip:nil d:nil tags:not-in-toc
#+INFOJS_OPT: view:nil toc:t ltoc:t mouse:underline buttons:0 path:org-info.js
#+LINK_UP:
#+LINK_HOME: 
#+STYLE:    <link rel="stylesheet" type="text/css" href="worg.css" />
#+STYLE:    <script type="text/javascript" src="org-info.js"> 
#+STARTUP: overview hideblocks
* 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, plain html, or plain org or wiki formats?
** Gnugol is small
   Presently the command line binary weighs in at less than 40k 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 --text in the beginning was the command line]]
** Emacs 
   Emacs has an incredibly powerful outliner called [[http://www.orgmode.org][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. 

[[shell:gnugol --org in the beginning was the command line]] 
*** Search: in the beginning was the command line
**** [[http://www.cryptonomicon.com/beginning.html][In the Beginning was the Command Line - CRYPTONOMICON]]
     A history of operating systems, by <NAME>, the author of such novels as Snow Crash, The Diamond Age and Zodiac.
**** [[http://artlung.com/smorgasborg/C_R_Y_P_T_O_N_O_M_I_C_O_N.shtml]["In the Beginning Was The Command Line" - by <NAME> ]]
     In the Beginning was the Command Line. by <NAME>. About twenty years ago Jobs and Wozniak, the founders of Apple, came up with the very strange 
**** [[http://en.wikipedia.org/wiki/In_the_Beginning..._Was_the_Command_Line][In the Beginning Was the Command Line - Wikipedia, the free ]]
     In the Beginning Was the Command Line is an essay by <NAME> which was originally published online in 1999 and later made available in book form 
**** [[http://www.amazon.com/Beginning-was-Command-Line-Neal-Stephenson/dp/0380815931][Amazon.com: In the Beginningwas the Command Line (9780380815937 ]]
     That aside, "In the Beginning Was the Command Line" should be required reading for anyone who a) regularly uses a personal computer b) has expressed an 
**** [[http://www.sindominio.net/metabolik/alephandria/txt/stephenson_at_the_beginning.pdf][In the Beginning was the Command Line]]
     In the Beginning was the Command Line. <NAME>. June 25, 2004. 1 Introduction. About twenty years ago Jobs and Wozniak, the founders of Apple, 

     (The interesting thing to me about this query was that only buried deep within wikipedia was the link to the updated, annotated version of “[[http://garote.bdmonkeys.net/commandline/index.html][In the beginning was the command line]]”, which is what I was searching for in the first place). 

     You can also use gnugol to output results directly into emacs's w3 browser or any other browser, within emacs, as per the below.

     This website and documentation for gnugol are all managed as org-mode files.
** For the command line guys
   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 --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:
#+INCLUDE: "../src/scripts/gl" src sh
I have a similar one (ge) to bring up the results in emacs:
#+INCLUDE: "../src/scripts/ge" src sh
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: [[file:trust.org][Trust Relationships]]
** For integration with other tools
* Other Resources
** [[file:faq.org][FAQ]]
** [[file:history.org][History]]
** [[file:gnugol.odp][2008 Openoffice presentation on gnugol and gnugold]]
** [[file:bugs.org][Bugs]]
** [[file:gnugold.org][Gnugold query router]]
* Tests
** [[file:search.html][Test CGI search]]
* Where to get it?
Gnugol is being maintained in a repository on [[https://github.com/dtaht/Gnugol][github]]. 
{'fraction_non_alphanumeric': 0.07913279132791327, 'fraction_numerical': 0.007897793263646922, 'mean_word_length': 4.160207750699161, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 2, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3569682', 'n_tokens_mistral': 3846, 'n_tokens_neox': 3573, 'n_words': 1854}