wiki:UnderscoreWikiPlugin

Version 16 (modified by Ryan J Ollos, 7 years ago) (diff)

Link to local documentation.

Underscore_Wiki_Page automatic linking

Description

This is a one-file plugin that transforms the MediaWiki styled Underscore_Wiki_Page to a link automatically, as it does with CamelCaseWikiPage see CamelCase. This pliugin requires that the wiki page name must have at least two words and each word must start with an upper case letter, like Foo_Bar_Baz.

It was originally created to make class names, like Controller_Frontend_Foobar link to the corresponding wiki page automatically. However, we do think that CamelCaseStyle is prettier and should still be used for Trac wiki pages.

Bugs/Feature Requests

Existing bugs and feature requests for UnderscoreWikiPlugin are here.

If you have any issues, create a new ticket or email to nadav
at
humaninternals <dot> com. I'm also at #trac, usually with the nickname shsek, shesek or execute.

Download

Download the zipped source from here.

Alternatively, you can download it using wget:

$ wget -O /path/to/trac/env/plugins/UnderscoreWiki.py https://trac-hacks.org/svn/underscorewikiplugin/0.12/UnderscoreWiki.py

Source

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

Installation

This plugin consists of a single file. You can simply put the UnderscoreWiki.py file directly in your plugins directory.

Make sure it is readable by the user running Trac.

Configuration

This plugin has two configuration options that can be set under a [underscore-wiki] section in TracIni.

  • ignore_missing_pages - Enable/disable highlighting Underscore_Wiki_Page links to missing pages. Defaults to false, which means not ignoring them, but they will be shown in grey with a question mark.
  • uppercase_in_words - Enable/disable using upper case letters in places other than the first character of every word. Only Foo_Bar is supported by default, setting this to true adds support for Foo_BAR, Foo_BaR, FOO_Bar, etc. Defaults to false.

This should look like:

[underscore-wiki]
ignore_missing_pages = true
uppercase_in_words = false

Recent Changes

8441 by shesek on 2010-08-24 20:15:43
Uploading the initial version of UnderscoreWikiPlugin
8440 by shesek on 2010-08-24 20:01:28
New hack UnderscoreWikiPlugin, created by shesek
(more)

Author/Contributors

Author: shesek
Maintainer: HumanInternals
Contributors: