|Version 11 (modified by rjollos, 2 years ago) (diff)|
Automatically creates links for all known Wiki pages
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. Autolinking a word can be disabled by prefixing the word with !, as is done for disabling autolinking of CamelCase wiki pages.
|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)>
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 -
pattern = r'\b(?P<autowiki>' + '|'.join([re.escape(page) for page in pages]) + r')\b'
pattern = r'\b(?P<autowiki>' + '|'.join([page for page in pages]) + r')\b'
Download the zipped source from here.
-  by jun66j5 on 2012-08-05 19:48:39
autowikifyplugin: follow-up to , ignores ucs4 characters on narrow build
-  by jun66j5 on 2012-08-05 19:32:23
fixed #2252: autowikify works with CJK wiki name
-  by rjollos on 2012-07-31 05:08:51
Refs #2252: Refactored, in preparation for applying Jun's patch to support Japanese wiki page names.