Changes between Version 11 and Version 12 of AutoWikifyPlugin


Ignore:
Timestamp:
Jul 28, 2012, 3:45:43 AM (2 years ago)
Author:
rjollos
Comment:

Documentation improvements.

Legend:

Unmodified
Added
Removed
Modified
  • AutoWikifyPlugin

    v11 v12  
    1111== Configuration ==
    1212
    13 The AutoWikifyPlugin has three configurable options in TracIni, both in the `autowikify` section:
    14 
    15 ||'''Option'''||'''Description'''||
    16 ||`minimum_length=<int>`||Override the default minimum of 3 character long page names recognised.||
    17 ||`explicitly_wikify=<name>[, <name> ...]`||Specify a list of names to explicitly wikify.||
    18 ||`exclude=<name>[, <name> ...]`||A list of names to exclude from autowikification.||
    19 
    20 
    21 If you are installing this plugin 'globally', you will need to add the following entry to the {{{components}}} section of your {{{trac-ini}}} file:
     13To install the plugin, you will need to add the following entry to the `components` section of your `trac.ini` file:
    2214
    2315{{{
     16#!ini
    2417[components]
    2518tracautowikify.* = enabled
     
    2720}}}
    2821
    29 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'):
     22The AutoWikifyPlugin has three configurable options in TracIni, both in the `autowikify` section:
     23
     24|| '''Option''' || '''Description''' ||
     25|| `minimum_length=<int>` || Override the default minimum of 3 character long page names recognised.||
     26|| `explicitly_wikify=<name>[, <name> ...]` || Specify a list of names to explicitly wikify. ||
     27|| `exclude=<name>[, <name> ...]` || A list of names to exclude from autowikification. ||
     28
     29If you want to use the configuration options mentioned above, add the following section to `trac.ini`:
    3030
    3131{{{
     32#!ini
    3233[autowikify]
    3334minimum_length=<number>
    34 explicitly_wikify=<value(s)>
    35 exclude=<value(s)>
     35explicitly_wikify=<comma-separated list of words>
     36exclude=<comma-separated list of words>
    3637}}}
    3738
     
    4546
    4647
    47 == regex based wildcards in explicitly_wikify ==
    48 If like me ( [wiki: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 -
     48== Regex based wildcards in explicitly_wikify ==
     49If, like me, ([wiki: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 -
    4950
    5051change
    5152{{{
    52         pattern = r'\b(?P<autowiki>' + '|'.join([re.escape(page) for page in pages]) + r')\b'
     53#!python
     54pattern = r'\b(?P<autowiki>' + '|'.join([re.escape(page) for page in pages]) + r')\b'
    5355}}}
    5456to
    5557{{{
    56         pattern = r'\b(?P<autowiki>' + '|'.join([page for page in pages]) + r')\b'
     58#!python
     59pattern = r'\b(?P<autowiki>' + '|'.join([page for page in pages]) + r')\b'
    5760}}}
    5861