DTRT: A CGI Script to Do The Right Thing

by Gerald Oskoboiny


This is a CGI script that tries to Do The Right Thing with whatever input you give it.

 

I made it mainly for my own use (for example, I use it on my start page), but others might find it useful as well.

What's new

Contents

Last updated $Date: 2011/04/16 20:04:25 $


What it does

If you enter something that looks like a URI, it goes to that URI. (sample)
If you enter a number, it goes to that RFC on ietf.org. (sample)
If you enter "draft-foo-...", it goes to that internet draft on ietf.org. (sample)
If you enter (part of) a newsgroup name, it shows you the FAQs for that group/hierarchy. (sample)
If you enter "hwg: /some/path", it goes to that path on hwg.org. (sample)
If you enter "vs: http://some/url", it validates that URL using the W3C Validation Service. (sample)
If you enter "define: word", it looks up that word in the dictionary. (sample)
If you enter "jargon: word or words", it looks up that word/phrase in the Jargon File. (sample)
If you enter "movie: movie title" it looks up that movie in The Internet Movie Database. (sample)
If you enter "actor: actor/actress name" it looks up that actor/actress in The Internet Movie Database. (sample)
If you enter "perl: keyword/function" it looks up that keyword/function in The Perl Documentation. (sample)
If you enter "cpan: module name or keywords" it does a search of CPAN for that module. (sample)
If you enter "book: book title/author" it looks up that title/author in amazon.com's database. (sample)
If you enter "cd: CD title/artist" it looks up that title/artist in amazon.com's database. (sample)
If you enter "stock: symbol" it looks up that stock symbol in Yahoo! Finance. (sample)
If you enter "html: element" it looks up that HTML element in the HTML 4.0 spec. (sample)
If you enter "boston: business/event" it looks up that business/event in boston.sidewalk.com. (sample)
If you enter "php: function" it looks up that PHP function in the manual. (sample)
If you enter "acronym: acronym" it looks up that acronym in the acronym database. (sample)
If you enter "weather: city" it looks up the weather for that city in Yahoo! Weather. (sample)
If you enter "mp3: song or artist name" it searches for that MP3 using oth.net. (sample)
If you enter "torrent: song/artist/movie/warez name" it searches for those warez using some torrent search site du jour. (sample)
If you enter "w3t: name/email" it looks up that person's contact info in the w3t-internal phonelist. (sample)
If you enter "fogo: search text" it looks up that text in the fogo mailing list archives. (sample)
If you enter "deb: package name" it looks for packages matching that string in the Debian GNU/Linux Packages. (sample)
If you enter "mid:some-message-id" or "something@w3.org" it looks up that message-id in W3C's mailing list archives (sample)
If you enter "altavista: search text" it looks up that text in AltaVista. (sample)

Otherwise (if none of the above things apply), it does a Web search using google.com. (sample)

Any other ideas?

Usage

  <form action="http://impressive.net/services/dtrt/dtrt">
    <input name=text>
  </form>

Put that on a Web page somewhere, then type stuff into it.

Related/similar stuff

Todo list


Valid HTML 4.0! Last modified: $Date: 2011/04/16 20:04:25 $
Gerald Oskoboiny, <gerald@impressive.net>