MoinMoin

eGenix.com MoinMoin Library

MoinMoin is a wiki implementation written in Python. eGenix uses it internally as knowledge base and to manage product development. Because we want to encourage its usage, we make some of our plugins & patches available in our MoinMoin library.

"Rename Multiple Pages" Action Plugin

Version: 1.0

License: GPLv2

Copyright: eGenix.com, info@egenix.com

Download: RenameMultiplePages.py

Summary

The RenameMultiplePages.py plugin is a useful action to quickly rename a whole set of pages in a MoinMoin wiki, e.g. due to changes of a product/project name or a general overhaul of the naming scheme used in a wiki.

Usage

When invoking the action "Rename Multiple Pages", the following dialog box appears:

The renaming is done based on regular expressions and uses the syntax defined by the Python re module. You can define pattern groups to keep certains parts of a pages name and only replace others, e.g. "Project A: (.*)" -> "Project B: \1" (without the quotes) to rename the project, but keep all the remaining parts of the page name.

Both the Page name pattern and New name pattern can be regular expressions. The New name pattern can also reference matched pattern groups using the \1, \2, etc. notation.

The reason text is used for saving the page changes.

When clicking on the rename button, all pages of the site are scanned and matching page names are renamed. This is done in the same way as you would change the name of a single page.

IMPORTANT WARNING !

Note that references to the old page names are not changed. Use the Search And Replace Multiple Pages Action action plugin for that.

Because this action can potentially ruin your entire wiki, please create a backup before using the action.

To provide some protection against accidental use, the action can only be run by the wiki super user.

Installation

Download the .py file and copy it into your <path to wiki instance>/data/plugin/action/ directory.

"Search And Replace Multiple Pages" Action Plugin

Version: 1.0

License: GPLv2

Copyright: eGenix.com, info@egenix.com

Download: SearchAndReplaceMultiplePages.py

Summary

The SearchAndReplaceMultiplePages.py plugin is a useful action to quickly rename a whole set of pages in a MoinMoin wiki, e.g. due to changes of a product/project name or a general overhaul of the naming scheme used in a wiki.

Usage

When invoking the action "Search and Replace Multiple Pages", the following dialog box appears:

All patterns are done based on regular expressions. The syntax defined by the Python re module is used. You can define pattern groups to keep certains parts of a search text and only replace the text you want, e.g. "["Project A: (.*)"]" -> "["Project B: \1"]" (without the outer quotes) to rename links to project pages that were changed using the Rename Multiple Pages Action while keeping the end of the page names as they were.

Page name pattern, Search text pattern and Replace text pattern can be regular expressions. The Replace name pattern can also reference matched pattern groups using the \1, \2, etc. notation. Use ".*" as Page name pattern to search the whole wiki.

The reason text is used for saving the page changes.

When clicking on the rename button, all pages of the site are scanned and matching text strings on the pages are replaced. This is done in the same way as you would do a search & replace on a single page within the editor.

IMPORTANT WARNING !

Because this action can potentially ruin your entire wiki, please create a backup before using the action.

To provide some protection against accidental use, the action can only be run by the wiki super user.

Installation

Download the .py file and copy it into your <path to wiki instance>/data/plugin/action/ directory.

Feedback

If you have feedback on any of these tools, please sign up to our eGenix Users Mailing List.

Enjoy !