#
# ns-cli.conf -- configuration file for ns-cli. 
#
# What am I talking about? See <http://www.lafferty.ca/software/>.
#
# How do I use this? See the README in the ns-cli package.

# Regex to match allowed addresses -- leave blank to allow access
# from anywhere

$allowed = '';

# define your fave URLs here.
# 
# Format: 
#  
#   key => {URL => 'http://foo.com/search.cgi?term=%%QUERY%%',
#           DESC => 'Search foo.com'}
#
# (The query "key word1 word2" will redirect the user to 
# <http://foo.com/search.cgi?term=word1+word2>, and the 'help me' 
# query will show "key    Search foo.com".)
#
#   key => {SYNONYM => 'otherkey'}
#
# (Entering "key" will do the same thing as entering "otherkey",
# which must be defined as well. Synonyms cannot point to other
# synonyms.)

%search = (

   # If the first word doesn't match any command, we do this. This lets
   # you type "cold beans" instead of "find cold beans", for instance.
   default => {SYNONYM => 'google'},

   # Google
   google  => {URL => 'http://www.google.com/search?query=%%QUERY%%',
               DESC => 'Search the web with Google'},
   find    => {SYNONYM => 'google'},
   go      => {URL => 'http://www.google.com/search?btnI=I%27m+Feeling+Lucky&query=%%QUERY%%',
               DESC => 'Go to first result of Google search ("I feel lucky")'},
   usenet  => {URL => 'http://groups.google.com/groups?num=100&q=QUERY',
               DESC => 'Search Usenet with Google'},


   # Dictionaries, thesauruses
   oed     => {URL => 'http://dictionary.oed.com/cgi/findword?query_type=word&find=find&queryword=%%QUERY%%',
               DESC => 'Look up word in online Oxford English Dictionary'},
   mw      => {URL => 'http://www.m-w.com/cgi-bin/dictionary?book=Dictionary&va=%%QUERY%%', 
               DESC => 'Look up word in Merriam-Webster Collegiate Dictionary'},
   thes    => {URL => 'http://www.m-w.com/cgi-bin/dictionary?book=Thesaurus&va=%%QUERY%%', 
               DESC => "Look up word in Roget's New Thesaurus"},
   foldoc  => {URL => 'http://wombat.doc.ic.ac.uk/foldoc/foldoc.cgi?query=%%QUERY%%',
               DESC => "Look up word in the Free On-line Dictionary of Computing"},
   dict    => {SYNONYM => 'mw'},

   # Software repositories, etc
   cpan    => {URL => 'http://search.cpan.org/search?mode=module&query=%%QUERY%%',
               DESC => 'Search for Perl module on CPAN'},
   rpm     => {URL => 'http://www.rpmfind.net/linux/rpm2html/search.php?query=%%QUERY%%',
               DESC => 'Search for RPMs on rpmfind.net'},
   rpmfind => {SYNONYM => 'rpm'},
   fm	   => {URL => 'http://freshmeat.net/search/?section=projects&q=%%QUERY%%',
               DESC => 'Search for project on Freshmeat'},
   fmp	   => {URL => 'http://freshmeat.net/projects/%%QUERY%%/',
               DESC => 'Go to Freshmeat project by name'},
   sf	   => {URL => 'http://sourceforge.net/projects/%%QUERY%%/',
               DESC => 'Go to SourceForge project by name'},
   phpman  => {URL => 'http://www.php.net/%%QUERY%%',
               DESC => 'Search PHP manual'},
   rfc     => {URL => 'http://www.cis.ohio-state.edu/cgi-bin/rfc/rfc%%QUERY%%.html',
               DESC => 'Bring up hypertext RFC by number'},
   bug     => {URL => 'http://your-bugzilla-url/show_bug.cgi?id=%%QUERY%%',
               DESC => 'Customize this to bring up Bugzilla bugs by number'},
   rt      => {URL => 'http://your-rt-url/Ticket/Display.html?id=%%QUERY%%',
               DESC => 'Customize this to bring up RT tickets by number'},
   linuxt  => {URL => 'http://linuxtoday.com/search.php3?query=%%QUERY%%',
               DESC => 'Search LinuxToday'},

   # Communities
   livej   => {URL => 'http://www.livejournal.com/users/%%QUERY%%/',
               DESC => 'Go to Livejournal for indicated user'},
   lj      => {SYNONYM => 'livej'},
   liveji  => {URL => 'http://www.livejournal.com/userinfo.bml?user=%%QUERY%%',
               DESC => 'Go to Livejournal userinfo page for user'},
   advo	   => {URL => 'http://www.advogato.org/person/%%QUERY%%/',
               DESC => 'Go to Advogato page for indicated user'},

   # Other stuff
   validate => {URL => 'http://validator.w3.org/check?uri=%%QUERY%%',
                DESC => 'Validate HTML at indicated URL'},
   bobby   => {URL => 'http://bobby.cast.org/bobby?URL=%%QUERY%%&output=Submit',
               DESC => 'Test HTML at indicated URL for accessibility'},
   ebay    => {URL => 'http://search.ebay.com/search/search.dll?MfcISAPICommand=GetResult&ht=1&SortProperty=MetaEndSort&query=%%QUERY%%',
               DESC => 'Search eBay'},
   ebayn   => {URL => 'http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=%%QUERY%%',
               DESC => 'Go to eBay auction by number'},
   quote   => {URL => 'http://finance.yahoo.com/q?s=%%QUERY%%&d=c',
               DESC => 'Stock quote and chart from Yahoo Finance'},
   stock   => {SYNONYM => 'quote'},
   symbol  => {URL => 'http://finance.yahoo.com/l?m=US&s=%%QUERY%%',
               DESC => 'Look up a stock symbol'},
   shorten => {URL => 'http://makeashorterlink.com/index.php?url=%%QUERY%%',
               DESC => 'Create makeashorterlink.com link to URL'}

);


# Leave this here!
1;

