Automatically creates links for all known Wiki pages

Description

Automatically create links for all known Wiki pages, even those that are not in CamelCase.

For example, with this plugin enabled, the bare word plugin would be linked thus plugin.

Configuration

The AutoWikifyPlugin has three configurable options in TracIni, both in the autowikify section:

OptionDescription
minimum_length=<int>Override the default minimum of 3 character long page names recognised.
explicitly_wikify=<name>[, <name> ...]Specify a list of names to explicitly wikify.
exclude=<name>[, <name> ...]A list of names to exclude from autowikification.

If you are installing this plugin 'globally', you will need to add the following entry to the components section of your trac-ini file:

[components]
tracautowikify.* = enabled
...

If you want to use the configuration options mentioned above, add the following section to that same file (NOTE: Use 'autowikify' for this section, not 'tracautowikify'):

[autowikify]
minimum_length=<number>
explicitly_wikify=<value(s)>
exclude=<value(s)>

Bugs/Feature Requests

Existing bugs and feature requests for AutoWikifyPlugin are here.

If you have any issues, create a new ticket.

regex based wildcards in explicitly_wikify

If like me ( SvenDowideit ) you want to link to an external wiki (TWiki) and need a large set of non-CamelCase words (in this case our bug tracking system (of the style of Bugs.Item1234) the you can modify autowikify.py to remove the escaping of regex strings -

change

        pattern = r'\b(?P<autowiki>' + '|'.join([re.escape(page) for page in pages]) + r')\b'

to

        pattern = r'\b(?P<autowiki>' + '|'.join([page for page in pages]) + r')\b'

Download

Download the zipped source from here.

Source

You can check out AutoWikifyPlugin from here using Subversion, or browse the source with Trac.

Recent Changes

[1925] by athomas on 02/06/07 12:30:14

AutoWikifyPlugin:

Escape page names.

[825] by athomas on 06/07/06 06:59:06

AutoWikifyPlugin:

  • Use new-style config properties.
  • Added exclude option for excluding a set of pages from auto-wikifiation.

[740] by athomas on 05/03/06 10:21:53

AutoWikifyPlugin:

  • Added autowikify.minimum_length for overriding the default minimum page name length of 3 characters.
  • Added autowikify.explicitly_wikify, which can be used to explicitly wikify a set of comma-separated page names.

[736] by athomas on 05/02/06 17:10:52

AutoWikifyPlugin:

Fixes #351

Author/Contributors

Author: athomas
Contributors: