<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>mattdorn.com &#187; reStructuredText</title>
	<atom:link href="http://www.mattdorn.com/content/tag/restructuredtext/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mattdorn.com</link>
	<description>Generously funded by Matt Dorn</description>
	<lastBuildDate>Sun, 07 Feb 2010 00:07:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>reStructuredText tools for gedit</title>
		<link>http://www.mattdorn.com/content/restructuredtext-tools-for-gedit/</link>
		<comments>http://www.mattdorn.com/content/restructuredtext-tools-for-gedit/#comments</comments>
		<pubDate>Thu, 15 Feb 2007 09:20:07 +0000</pubDate>
		<dc:creator>mdorn</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[reStructuredText]]></category>

		<guid isPermaLink="false">http://67.207.132.145/wordpress/?p=41</guid>
		<description><![CDATA[


Over the last couple of days, I put together some reStructuredText tools for gedit, the lightweight text editor for the Gnome desktop on Linux.  They include syntax highlighting, some keyboard shortcuts, and an HTML preview feature that I derived from another developer&#8217;s earlier work on Markdown support.
This was made possible by gedit&#8217;s excellent plugin [...]]]></description>
			<content:encoded><![CDATA[
<div class="document">
<!-- -*- mode: rst -*- -->
<p>Over the last couple of days, I put together some <a class="reference" href="http://textmethod.com/wiki/ReStructuredTextToolsForGedit">reStructuredText tools for gedit</a>, the lightweight text editor for the Gnome desktop on Linux.  They include syntax highlighting, some keyboard shortcuts, and an HTML preview feature that I derived from another developer&#8217;s earlier work on <a class="reference" href="http://live.gnome.org/Gedit/MarkdownSupport">Markdown support</a>.</p>
<p>This was made possible by gedit&#8217;s excellent plugin system, which allows you extend the application via <a class="reference" href="http://python.org">Python</a>.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.mattdorn.com/content/restructuredtext-tools-for-gedit/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Trac + Darcs + reStructuredText</title>
		<link>http://www.mattdorn.com/content/trac-darcs-restructuredtext/</link>
		<comments>http://www.mattdorn.com/content/trac-darcs-restructuredtext/#comments</comments>
		<pubDate>Thu, 01 Feb 2007 10:50:08 +0000</pubDate>
		<dc:creator>mdorn</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[darcs]]></category>
		<category><![CDATA[project management]]></category>
		<category><![CDATA[reStructuredText]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[trac]]></category>

		<guid isPermaLink="false">http://67.207.132.145/wordpress/?p=38</guid>
		<description><![CDATA[


Edgewall Software&#8217;s Trac seems to have become something of a standard for agile management of software projects both within the Open Source community and within closed organizations, and after having the opportunity to use it on a recent project, I can appreciate why.  It&#8217;s simple to setup and manage, and its self-described &#34;minimalistic approach [...]]]></description>
			<content:encoded><![CDATA[
<div class="document">
<!-- -*- mode: rst -*- -->
<p>Edgewall Software&#8217;s <a class="reference" href="http://trac.edgewall.org/">Trac</a> seems to have become something of a standard for agile management of software projects both within the Open Source community and within closed organizations, and after having the opportunity to use it on a recent project, I can appreciate why.  It&#8217;s simple to setup and manage, and its self-described &quot;minimalistic approach to web-based software project management&quot; is exactly along the lines of my own philosophy.</p>
<p>For that project I used a default setup with a <a class="reference" href="http://subversion.tigris.org/">Subversion</a> repository, and composed Wiki pages using the default Wiki markup. While Subversion is obviously a standard, for personal projects I prefer to use the distributed versioning system <a class="reference" href="/content/getting-started-with-darcs">Darcs</a>, and I usually insist on doing the majority of my text composition in <a class="reference" href="/content/the-pleasure-of-the-restructured-text">reStructuredText</a>.  So when I found out that there was a <a class="reference" href="http://progetti.arstecnica.it/trac+darcs/">Darcs plugin</a> for Trac and that it also <a class="reference" href="http://trac.edgewall.org/wiki/WikiRestructuredText">supports reStructuredText</a> , I got motivated to get a couple of <a class="reference" href="http://gnapsack.textmethod.com/">my own</a> <a class="reference" href="http://plonexl8.textmethod.com">projects</a> up and running. What follows is a brief description of the steps I took to do so.</p>
<div class="contents topic">
<p class="topic-title first"><a id="contents" name="contents">Contents</a></p>
<ul class="auto-toc simple">
<li><a class="reference" href="#get-the-software" id="id1" name="id1">1&nbsp;&nbsp;&nbsp;Get the software</a></li>
<li><a class="reference" href="#set-up-your-trac-instance" id="id2" name="id2">2&nbsp;&nbsp;&nbsp;Set up your Trac instance</a></li>
<li><a class="reference" href="#install-and-configure-the-trac-plugins" id="id3" name="id3">3&nbsp;&nbsp;&nbsp;Install and configure the Trac plugins</a></li>
<li><a class="reference" href="#configure-apache-and-mod-python" id="id4" name="id4">4&nbsp;&nbsp;&nbsp;Configure Apache and mod_python</a></li>
<li><a class="reference" href="#configure-user-authentication-and-permissions" id="id5" name="id5">5&nbsp;&nbsp;&nbsp;Configure user authentication and permissions</a></li>
<li><a class="reference" href="#final-notes" id="id6" name="id6">6&nbsp;&nbsp;&nbsp;Final notes</a><ul class="auto-toc">
<li><a class="reference" href="#darcs-tracs-bug" id="id7" name="id7">6.1&nbsp;&nbsp;&nbsp;Darcs+Tracs bug</a></li>
<li><a class="reference" href="#restructuredtext-in-trac" id="id8" name="id8">6.2&nbsp;&nbsp;&nbsp;reStructuredText in Trac</a></li>
</ul>
</li>
</ul>
</div>
<div class="section">
<h2><a class="toc-backref" href="#id1" id="get-the-software" name="get-the-software">1&nbsp;&nbsp;&nbsp;Get the software</a></h2>
<p>I&#8217;m assuming your system has fundamentals like Python and Apache installed.  In addition:</p>
<ul>
<li><p class="first">Trac (I&#8217;m using v0.10.x)</p>
</li>
<li><p class="first">Darcs (I&#8217;m using v. 1.0.8)</p>
</li>
<li><p class="first">sqlite2 (I personally had problems with version 3 and the Darcs plugin on a Fedora Core 4 system, which have been reported to the project maintainers)</p>
</li>
<li><dl class="first docutils">
<dt>Trac plugins</dt>
<dd><ul class="first last simple">
<li><a class="reference" href="http://progetti.arstecnica.it/trac+darcs/">Darcs plugin</a></li>
<li><a class="reference" href="http://trac.edgewall.org/wiki/WebAdmin">Web Admin plugin</a></li>
<li><a class="reference" href="http://trac-hacks.org/wiki/AccountManagerPlugin">Account Manager plugin</a></li>
</ul>
</dd>
</dl>
</li>
<li><p class="first">Python docutils (for reStructuredText support)</p>
</li>
<li><p class="first"><a class="reference" href="http://silvercity.sourceforge.net/">SilverCity</a> (for syntax coloring of your code)</p>
</li>
<li><p class="first">Python setuptools (for working with Trac plugins)</p>
</li>
<li><p class="first">Apache mod_python</p>
</li>
</ul>
<p>Note that the items that are not linked above should be available via the package manager of most modern Linux systems.  You&#8217;ll want to install everything except that Trac plugins before moving on to the next step.</p>
</div>
<div class="section">
<h2><a class="toc-backref" href="#id2" id="set-up-your-trac-instance" name="set-up-your-trac-instance">2&nbsp;&nbsp;&nbsp;Set up your Trac instance</a></h2>
<p>Create a directory where you want to maintain your Trac projects and use the <tt class="docutils literal"><span class="pre">trac-admin</span></tt> command to create the instance and associate it with your Darcs repository:</p>
<pre class="literal-block">
trac-admin /path/to/MyProject initenv &quot;My Project&quot; sqlite:db/trac.db darcs /path/to/repo /usr/share/trac/templates/
</pre>
<p>The instance is successfully created, but you&#8217;ll get a warning that Trac is not supported.  That&#8217;s because you haven&#8217;t setup the plugins yet.</p>
</div>
<div class="section">
<h2><a class="toc-backref" href="#id3" id="install-and-configure-the-trac-plugins" name="install-and-configure-the-trac-plugins">3&nbsp;&nbsp;&nbsp;Install and configure the Trac plugins</a></h2>
<p>Download the source for each plugin into a temporary directory.  Trac handles plugins in the Python &quot;egg&quot; format.  So in the source directory of each, run the following command:</p>
<pre class="literal-block">
python setup.py bdist_egg
</pre>
<p>That will create a file with a <tt class="docutils literal"><span class="pre">.egg</span></tt> extension in the <tt class="docutils literal"><span class="pre">dist</span></tt> directory of the plugin you&#8217;ve downloaded, which you can now copy to the <tt class="docutils literal"><span class="pre">plugins</span></tt> directory of your new Trac instance.  Be sure to copy all three of them.</p>
<p>Now you need to update your Trac instance to understand the Darcs plugin:</p>
<pre class="literal-block">
trac-admin /path/to/MyProject upgrade
trac-admin /path/to/MyProject resync
</pre>
<p>Finally, add the following to the <tt class="docutils literal"><span class="pre">conf/trac.ini</span></tt> file of your instance, under the <tt class="docutils literal"><span class="pre">[components]</span></tt> section:</p>
<pre class="literal-block">
[components]
trac.web.auth.LoginModule = disabled
acct_mgr.web_ui.LoginModule = enabled
trac.ticket.report.* = disabled
</pre>
<p>You may wish to test your instance now, using Trac&#8217;s built-in Web server, and browsing to <tt class="docutils literal"><span class="pre">localhost:8000</span></tt>:</p>
<pre class="literal-block">
tracd --port 8000 /path/to/MyProject
</pre>
<p>or:</p>
<pre class="literal-block">
/usr/sbin/tracd --port 8000 /path/to/MyProject
</pre>
<p>Make sure you can browse your Darcs repo to confirm that the Darcs plugin is working.  If you&#8217;re not seeing syntax highlighting, check to make sure <a class="reference" href="http://silvercity.sourceforge.net/">SilverCity</a> has been installed correctly.</p>
<p>In this setup, however, we&#8217;ll ultimately be using Apache and mod_python to server the instance, and a few extra steps are needed.</p>
</div>
<div class="section">
<h2><a class="toc-backref" href="#id4" id="configure-apache-and-mod-python" name="configure-apache-and-mod-python">4&nbsp;&nbsp;&nbsp;Configure Apache and mod_python</a></h2>
<p><a class="reference" href="http://trac.edgewall.org/wiki/TracModPython">Trac&#8217;s documentation on mod_python</a> is mostly adequate, with one exception.  You need to identify a cache directory for your instance&#8217;s egg plugins.  In your <tt class="docutils literal"><span class="pre">Location</span></tt> directive, composed in accordance with that documentation, including the following line should be sufficient:</p>
<pre class="literal-block">
SetEnv PYTHON_EGG_CACHE /tmp/trac-eggs
</pre>
<p>For the sake of completeness, the <tt class="docutils literal"><span class="pre">Location</span></tt> directive inside the VirtualHost setup for your site should look something like this, if you have multiple Trac instances:</p>
<pre class="literal-block">
&lt;Location /projects&gt;
  SetHandler mod_python
  PythonHandler trac.web.modpython_frontend
  PythonOption TracEnvParentDir /path/to/my/trac/projects
  SetEnv PYTHON_EGG_CACHE /tmp/trac-eggs
  PythonOption TracUriRoot /projects
&lt;/Location&gt;
</pre>
<p>Finally, the user under which Apache is run will need read and write access to the following directories in your instance:</p>
<ul class="simple">
<li>db</li>
<li>attachments</li>
<li>log</li>
</ul>
</div>
<div class="section">
<h2><a class="toc-backref" href="#id5" id="configure-user-authentication-and-permissions" name="configure-user-authentication-and-permissions">5&nbsp;&nbsp;&nbsp;Configure user authentication and permissions</a></h2>
<p>By default, Trac allows the anonymous user access to nearly everything, so you&#8217;ll want to make some changes.  Fortunately the Web Admin and Account Manager plugins make this fairly easy to do.  Before you create any user accounts, I found it was easiest simply to start by adding the TRAC_ADMIN permission to the anonymous group via the command line admin tool:</p>
<pre class="literal-block">
trac-admin /path/to/projenv permission add anonymous TRAC_ADMIN
</pre>
<p>Once I have access to the &quot;Admin&quot; button in the Web interface as anonymous I performed the following:</p>
<ol class="arabic simple">
<li>In Accounts &gt; Configuration, identify the path to the HtPasswdStore.  Ideally this will probably be a location within your instance.  The Web server user will need to be able to write to the location.</li>
<li>In Accounts &gt; Users, add a user.  Note that you could also add a user by registering yourself via the &quot;Register&quot; link that should appear after having installed the Account Manager plugin.</li>
<li>In General &gt; Permissions, create an &quot;admin&quot; group in the &quot;Add Subject to Group&quot; box.</li>
<li>In the same box, add the newly created user to the admin group.</li>
<li>Now, remove any &quot;CREATE&quot; or &quot;DELETE&quot; or write-related permissions, especially TRAC_ADMIN, from the anonymous subject.</li>
<li>Using the &quot;Grant Permission&quot; box, add anything appropriate for your setup to the &quot;authenticated&quot; subject.  Make sure the TRAC_ADMIN permission is assigned to the newly created admin group.</li>
<li>Add any other groups appropriate to your project (e.g., developers, who would probably have access to everything except TRAC_ADMIN)</li>
</ol>
</div>
<div class="section">
<h2><a class="toc-backref" href="#id6" id="final-notes" name="final-notes">6&nbsp;&nbsp;&nbsp;Final notes</a></h2>
<p>It&#8217;s up to you to configure your ticket system with the appropriate values for components, milestones, versions, etc.</p>
<div class="section">
<h3><a class="toc-backref" href="#id7" id="darcs-tracs-bug" name="darcs-tracs-bug">6.1&nbsp;&nbsp;&nbsp;Darcs+Tracs bug</a></h3>
<p>Note that the only <a class="reference" href="http://trac.edgewall.org/ticket/4449">major bug with the Darcs plugin</a> that I&#8217;ve found is the broken &quot;view changes&quot; button.  That will need to be fixed before Trac+Darcs is a completely legitimate product.</p>
</div>
<div class="section">
<h3><a class="toc-backref" href="#id8" id="restructuredtext-in-trac" name="restructuredtext-in-trac">6.2&nbsp;&nbsp;&nbsp;reStructuredText in Trac</a></h3>
<p>Composing your Wiki pages in RST simply requires you to enclose your text with the following syntax:</p>
<pre class="literal-block">
{{{
#!rst

Your text goes here.

}}}
</pre>
<p>That&#8217;s an inconvenience, however minor, and I think a great Trac enhancement (which too my knowledge has not yet been suggested) would be the ability to set a default markup syntax in the configuration file.</p>
</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.mattdorn.com/content/trac-darcs-restructuredtext/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
