<?xml version="1.0"?>
<!DOCTYPE content [ <!ENTITY nbsp " "> ]>
<rdf:RDF xml:base="http://snarfed.org/rdf"
         xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:dc="http://purl.org/dc/elements/1.1/">

<rdf:Description rdf:about="http://snarfed.org">
  <dc:title> snarfed.org  </dc:title>
  <dc:description> draw group stream of consciousness </dc:description>
  <dc:creator> Ryan Barrett &lt;snarfed at ryanb dot org&gt; </dc:creator>
  <dc:language> en </dc:language>
  <dc:format> text/html </dc:format>
  <dc:rights> Copyright 2002-2007 Ryan Barrett </dc:rights>
</rdf:Description>

<rdf:Description rdf:about="http://snarfed.org/space/ditrit">
  <dc:title> ditrit </dc:title>
  <dc:creator> Ryan Barrett &lt;snarfed at ryanb dot org&gt; </dc:creator>
  <dc:date> 2003-01-01T05:00:00Z </dc:date>
  <dc:language> en </dc:language>
  <dc:format> text/html </dc:format>
  <dc:rights> Copyright 2002-2007 Ryan Barrett </dc:rights>

  <content>
    <p><a href="/space/ditrit-0.1.tar.gz"><img src="/space/do_the_right_thing.jpg" alt="/space/do_the_right_thing.jpg" title="" /></a></p>

<p>For the impatient: <br />
<a href="/space/ditrit-0.1.tar.gz">Download ditrit 0.1</a> <br />
<a href="/space/ditrit.py">View ditrit.py</a> <br />
<a href="/space/ditritrc">Example ditritrc file</a></p>

<p><a href="/space/Ditrit">Ditrit</a> is a programmable application launcher that tries to "do
the right thing" for any input. If ditrit is given an email address, it knows to
launch your email client and compose an email to that address. Likewise, ditrit
knows to open URLs in your browser, text files in your text editor, and AIM
screen names in your IM client.</p>

<p>Ditrit reads its input from stdin or from the X Windows primary selection (aka
clipboard). The ditrit configuration file consists of template regexps and
commands. The templates are matched against the input. When a match is found,
the corresponding command is run. The input can be wholly or partially inserted
into the command line.</p>

<p>To read from the X selection, you'll need
<a href="http://python-xlib.sf.net">python-xlib</a> in your PYTHONPATH when you run ditrit.</p>

<p>Ditrit's name comes from pronouncing the acronym DTRT, or <a href="http://www.catb.org/jargon/html/D/DWIM.html">Do The Right
Thing</a>.</p>

<p>There are similar CGI scripts on the web
(<a href="http://impressive.net/services/dtrt/">impressive.net</a>,
<a href="http://www.aaronsw.com/2002/dtrt">aaronsw</a>, <a href="http://www.clemens-radl.de/dtrt/">clemens
radl</a>), but they're specific to the web. More
importantly, the user must explicitly say what they want to do - <em>define:</em> for
dictionary, <em>movie:</em> for movie listings, etc. You don't have to tell Ditrit what
you want to do; it uses heuristics to guess on its own, based on the input.</p>

<p>Ditrit is copyright 2006 <a href="http://ryan.barrett.name/">Ryan Barrett</a>, and is
distributed under the <a href="http://www.gnu.org/licenses/gpl.html">GPL</a>.</p>

  </content>

  <rdf:Seq>

  </rdf:Seq>
</rdf:Description>
</rdf:RDF>
