MoinMoin Plugin

Author: Ollie Rutherfurd
Version: 0.3.5

About

MoinMoin Plugin enables one to browse and edit MoinMoin (http://moin.sourceforge.net/) wiki pages using jEdit.

It's inspired by EditMoin (https://moin.conectiva.com.br/EditMoin), by Gustavo Niemeyer, and though he gets credit for the idea, I'll take credit for any bugs.

Disclaimer

This plugin relies on finding certain strings in pages retrieved from the server. If they change, it may not work. It has been tested on versions of 1.0, 1.2, 1,3.x, 1.5.x of MoinMoin in English, but should work in other languages.

Usage

Opening Wiki Pages

Select MoinMoin -> Open Wiki Page... from the Plugins menu of the File System Browser's Plugins menu and enter the URL to the Wiki page. For example:

http://localhost/mywiki/MoinMoinPlugin

You may also open pages using the macro: Files -> Open Path and prepending moin: to the page URL. For example:

moin:http://localhost/mywiki/MoinMoinPlugin

Save Errors

If someone else edits a wiki page between when you opened a page in jEdit and when you save, you won't be able to save the page.

You'll get an error like:

Someone Else Saved

You won't be able to save the buffer until you reload it from the server.

The suggested way of handling this is copying your buffer contents to a new buffer, reload the original buffer, add your edits to the reloaded buffer, and save.

Viewing Wiki Pages in Browser

To view the current wiki page in your browser, select Plugins -> MoinMoin -> View Wiki Page in Browser. This will open the wiki page in your browser. InfoViewer, which is not required by MoinMoin plugin, must be installed for this feature to work.

Configuration

General

Prompt for change comment when saving
Enable or disable prompting for a comment when saving a wiki page. Note that if prompted, you may supply a blank comment.

Wikis

If you want to be identified when editing a Wiki, you'll need to add it to the list of recognized Wikis.

Wiki Properties

Wiki Properties Dialog
Name
Display name for wiki. Required, but defaults to URL if not given.
URL
URL for the front page of the wiki. HTTPS is currently not support, if the server's certificate is not signed. This is required. As an example, if the path to the front page of your wiki is http://localhost/moin.cgi/FrontPage, then your URL would be http://localhost/moin.cgi/.
User ID
In Moin 1.3 and earlier, you can find this by clicking

your username link, usually in the top right corner. On the UserPreferences page, it's the ID value.

In 1.3 and later, User ID is no longer displayed. You can find this either by looking at the MOIN_ID cookie value after looking in using a browser, or using the following macro:

# ShowUserId.py
#
# refer to Moin documentation instructions
# on installing this

import MoinMoin
import MoinMoin.user
from MoinMoin.user import User

def execute(macro, arguments = ""):
        """ Returns the user ID (which is used by moinmoin plugin ) """
        request = macro.request
        userobject = request.get_user()
        return '<p class="userid"> UserId: ' + userobject.id + '</p>'

Known Bugs and Limitations

  • You can't edit pages over an HTTPS connection, if the server's certificate is not trusted.
  • Save As and Save a Copy As actions don't work.

Future Plans & Ideas

  • Subscribe to Page action
  • add Delete support
  • Creating pages from Templates
  • Support for previewing changes?
  • Support for opening "Wiki:Link"'s in a browser
  • Character encoding support

Feedback

Send bug reports or feature requests to:

Change Log

  • Version 0.3.5, required jEdit 4.3pre7, XML plugin 0.13, and Jakarta Commons plugin 0.4.3.
    • Updated for 4.3pre7 API changes (BufferSaveRequest moved from buffer to bufferio).
  • Version 0.3.4, requires jEdit 4.3pre2, XML plugin 0.13, and Jakarta Commons plugin 0.4.3.
    • Updated for MoinMoin 1.5.
  • Version 0.3.3, requires jEdit 4.3pre2, XML plugin 0.13, and Jakarta Commons plugin 0.4.3.
    • Updated for API changes
  • Version 0.3.2, requires jEdit 4.2pre11, XML plugin 0.13, and Jakarta Commons plugin 0.4.3.
    • Fixed editing of subpages (so "ParentPage/SubPage" doesn't have to be escaped as "ParentPage_2fSubPage".
    • Automatically append "/" to wiki URL if missing, when adding or editing a Wiki in the options - missing the trailing slash has been a common source of problems for users.
  • Version 0.3.1, requires jEdit 4.2pre11, XML plugin 0.13, and Jakarta Commons plugin 0.4.3.
    • MOIN_ID Cookie sent when opening pages. Without this, one may not be recognized and be unable to edit pages restricted by ACLs.
  • Version 0.3, requires jEdit 4.2pre11, XML plugin 0.13, and Jakarta Commons plugin 0.4.3.
    • User may supply a change comment when saving pages.
    • Edit notifications will be sent, if they're enabled on the wiki.
  • Version 0.2, requires jEdit 4.2pre11, XML plugin 0.13, and Jakarta Commons plugin 0.4.
    • Updated for MoinMoin 1.2
    • Added optional dependency on InfoViewer
    • Fixed broken backup saving.
  • Version 0.1, requires jEdit 4.2pre5, XML plugin 0.12, and Jakarta Commons plugin 0.4.

License

The source code for this plugin is release under the GPL. Please see http://www.fsf.org/copyleft/gpl.html.