}) to link to different parts of a wiki page.
That is, {quote:{wiki: page#anchorname}} would cause the browser to skip right
to the {quote:{anchor:anchorname}} markup in the given _page_.
Some wikis implement "verbatim" blocks. This can easily be done with two
separate custom markups, {quote:{verbatim}} and {quote:{endverbatim}} which
respectively generate and
HTML tags. For contrast,
{quote:{verbatim}} can use a inline style tag to generate an off-white
background such as .
*CVSTrac Shortcuts*
Want a link into the CVS repository without a cumbersome URL?
{quote:{getfile cvstrac/main.c}} with
{quote:%x}. The %x substitution allows you
to use things like {quote:{getfile cvstrac/main.c}} or
{quote:{getfile cvstrac/main.c CVSTrac's main.c}}.
Various tickets (#137, #122) have requested the ability to easily link to
{link: reportlist reports}. A {quote: {rptview:n}} markup can be easily
added with
{quote:%x} as a formatter.
*External Resources*
Most external resources will simply be markups as convenient links. The
advantage of using a custom markup rather than {quote:{link:}} markups or
straight HTML is that if a service changes, you only have to change the custom
markup.
CPAN module? {quote: {cpan: module}} using
{quote:%x}.
An external resource section wouldn't be complete without
{quote:{google: search terms}} with
{quote:%k %a}.
*Program Markups*
It's possible to write custom markups that call external programs. This isn't
always a good idea (from a performance and security perspective), but it may be
the only way to do some things. *Note* that some of these examples are simply
that, examples, and have *not* be exhaustively auditted from a security
perspective.
Trvial examples are markups which just run a command and spit out information.
Date/time stamps, system information, etc. For example, a trivial
{quote: {timestamp}} markup would simply use {quote: /bin/date} as a formatter
with no substitution arguments.
A more complicated example is a markup to inline something from the CVS
repository into the wiki page, such as {quote:{include: cvstrac/main.c}}. Using
the formatter {quote: /path/to/include '%r/%k'}, the following script could be
used to inline the latest version of any file found under the repository:
#!/bin/sh
FILE=`/bin/echo $1 | /bin/sed 's/\.\.//g'`
/bin/cat <
$FILE
`/usr/bin/co -q -p $FILE,v 2>/dev/null`
END
The really interesting markup happens when you start to interact with the
SQLite database, allowing for things like custom reports and whatnot. The
following script can be used to define a {quote:{wikitoc}} markup using
{quote: /path/to/wikitoc '%r/%n'}:
#!/bin/sh
for p in `sqlite $1.db 'SELECT name FROM wiki GROUP BY name ORDER BY name;'`
do
echo "$p
"
done
Or, to list all the new and active tickets using an {quote:{activetkts}}
markup, the following script:
#!/bin/sh
for t in `sqlite $1.db 'SELECT tn FROM ticket \
WHERE status IN ("new","active") ORDER BY tn;'`
do
echo "#$t "
done