ReStructuredTextPlugin
This plugin allows processing of reStructuredText input within a TWiki page. It accomplishes this task by calling the
trip reStructuredText parser.
trip is a Perl implementation of a reStructuredText parser (and writers).
reStructuredText is an easy-to-read, what-you-see-is-what-you-get plaintext markup syntax and parser system. It is useful for inline program documentation (such as Python docstrings), for quickly creating simple web pages, and for standalone documents. The original implementation of a reStructuredText parser is that of the docutils project, written in Python. The "trip" name is an acronym for
Transforming
reStructuredText
in
perl".
- %RESTSTART{parms}%
- %RESTEND%
The parms that are processed are:
options="<trip options>" : A set of options to be passed to the
trip executable.
stylesheet="<url>" : Uses
url as URL for a stylesheet.
%RESTSTART%
A reStructuredText Header
=========================
This is reStructuredText. Here I have a **bold block
with *italics* and ``literal`` nested within it**.
Another Header
==============
This is a second section.
%RESTEND%
It produces the following output:
%RESTSTART%
A reStructuredText Header
=====================
This is reStructuredText. Here I have a **bold block
with
italics and ``literal`` nested within it**.
Another Header
==========
This is a second section.
%RESTEND%
Plugin settings are stored as preferences variables. To reference a plugin setting write
%<plugin>_<setting>%, i.e.
%INTERWIKIPLUGIN_SHORTDESCRIPTION%
- One line description, is shown in the TextFormattingRules topic:
- Set SHORTDESCRIPTION = Render reStructuredText (Python documentation) within a TWiki page
- Debug plugin: (See output in
data/debug.txt)
- Set TRIP to give a different path to the
trip executable.
- Set TRIPOPTIONS to specify default options to
trip.
- Set TRIPOPTIONS = -D source_link=0 -D time=0 -D
Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.
- Download the ZIP file from the Plugin web (see below)
- Unzip
ReStructuredTextPlugin.zip in your twiki installation directory. Content:
|
|
| File: |
Description: |
data/TWiki/ReStructuredTextPlugin.txt |
Plugin topic |
data/TWiki/ReStructuredTextPlugin.txt,v |
Plugin topic repository |
lib/TWiki/Plugins/ReStructuredTextPlugin.pm |
Plugin Perl module |
lib/TWiki/Plugins/ReStructuredTextPlugin/fs-trip-twiki-/1.4.3/all/bin/trip |
Perl module |
|
|
|
- You might want to modify the location of the Perl program
trip; See the TRIP option above
- The
trip Perl program points to a specific Perl path; You will definitely want to modify that.
- Test if the installation was successful:
Related Topics: TWikiPreferences,
TWikiPlugins
--
TWiki:Main.SteveRJones - 19 May 2005
Topic revision: r4 - 2007-04-09 - 14:15:19 -
SteveRJones