ikiwiki/ plugins/ contrib/ sar (third party plugin)

Plugin: sar
Author: VictorMoral
Included in ikiwiki: no
Enabled by default: no
Included in goodstuff: no
Currently enabled: no

Warning: i'm using this plugin at my site and i have found too much problems with him. I discourage his use until a new version has been released. My apologies for the inconveniences. I think that is a good idea with a bad initial design.

The sar plugin is useful to make global or local search and replace operations using common or specific terms.

The characteristics are:

The global dictionary page is like this:

## Sites and projects

- \[[sar search="ikiwiki" first="[IkiWiki](http://ikiwiki.info)" next="_IkiWiki_"]]
- \[[sar search="debian" first="[Debian](http://debian.org)" next="_Debian_"]]
- \[[sar search="perl" first="[Perl](http://perl.org)" next="_Perl_"]]
- \[[sar search="linux" replace="GNU/Linux"]]

## Persons
- \[[sar search="joey" first="[Joey Hess](http://ikiwiki.info/users/joey]]" next="_Joey_" ]]
- \[[sar search="angel" first="[Angel](http://triptico.com)" next="Angel"]]

## Technical terms

- \[[sar search="smtp" first="\[[wp SMTP]]" next="‘SMTP‘"]]
- \[[sar search="pop3" first="\[[wp POP3]]" next="’POP3’"]]

The search parameter is a literal text; later will be used as part of the final regular expression.

A search and replace directive has the following parameters:

Configuration

The plugin need the following global values:

Caveats

This plugin works as a filter hook on the source markdown text; the dictionary terms must be carefully selected, because they could interfere with URLs and other preprocessor directives.

The code is highly experimental and the author will appreciate any help with his development or his english. I'm using at my site with minor problems.

sinopsys

In a ikiwiki source page we can write this

[[sar]]

for enable the sar plugin in this page or

[[sar disable = 1]]

for disable the sar plugin or

[[sar search=debian replace="__Debian__"]]

to define a global replace for the term debian or

\[[sar search=ibm first=’[IBM](http://www.ibm.com)’
        next="_IBM_"]]

to define a replace for the first match of the string ibm and a different replace for the rest, and

[[sar search=hp ]]
[[sar search=hp disable=1]]

to disable the sar plugin in the current page for the term hp.

Changelog

version 0.6

version 0.5

Download

The module can be downloaded from: