edittwiki - external editor tool for TWiki

January 2005
      1 2
3 4 5 6 7 8 9

Home page for edittwiki - the external editor tool for TWiki wiki topics.

XML-Image Syndication

XML-Image Comment Feed

Letterimage Contact me

edittwiki - an external editor for TWiki wiki topics.

I have been using the editMoin tool to edit my Personal Wiki and have found the superior editing capabilities of an editor extremely handy. Integrated spell checking, syntax highlighting ... all very helpful. I've been working with a TWiki installation lately and have struggled to find a similar capability. SO, in the spirit of the editMoin tool, I have written the edittwiki external editor utility.


The edittwiki 0.1.4 distribution can be downloaded from here. In addition the source is also available.


You must have installed a current JRE/JDK for your platform and the java executable should be in your path. To test this, run java -version from a command prompt. You should get a response from your java installation with its release information.

This has been tested on Windows XP and should work on any platform that has a recent java JDK/JRE.


editTwiki is written in python and compiled into a java jar using Jython which makes it a regular java application packaged into a jar.

To install it, unzip the distribution into an installation directory. Next add the distribution's bin directory to your path and add the edittwiki.jar file to your CLASSPATH. Next, define the EDITTWIKI environment variable to point to to the edittwiki.cfg config file and edit the config file to reflect the twiki installation you want to use it with. Once you are setup, run the following:

java edittwiki --help

This should display the usage information. You are done and ready to work.

Edittwiki defaults to using notepad as your editor. To set your own editor, define the EDITOR variable to the full path to your editor of choice. For example:

SET EDITOR=c:\tools\vim\vim63\gvim.exe


The basic commands are follows:

java edittwiki -H host_section -T Web.Topic

If you have defined a twiki host section in your config file pointing to the twiki.org site, you would use this as follows:

java edittwiki -H twiki -T Main.MyUserHomePage


The purpose of the config file is allow you to setup the connection details for the TWiki sites you use in advance. This keeps the amount of typing down to a minimum.

The following is a sample config file:




The section name is used on the command line to specify which server you want to talk to. If you do not specify a section, it looks for the general section as a default.


The host entry is the FQDN of the hostname where TWiki is installed. If your twiki install is on a port other than port 80, you should add it to the host setting. For example:



This is either http or https and must match your TWiki's installation (obviously).


If your TWiki site is installed in the root directory of the server and you access it through a url like:


Then you can safely ignore this setting. If however you use a url like the following:


then you need to define the initial directory after the hostname via the subdir setting.


If your TWiki site has installed its scripts in a directory other than cgi-bin, you need to specify that here:


userid / password

If your TWiki install is secured, you will be prompted to enter your credentials when you run the edittwiki tool. To avoid this hassle, define your userid and password in the config section for the secured host and you will not be prompted.


Thanks to David Blank-Edelman for extensively testing this with an https server. His conclusion is that due to a limitation in jython, it is not possible at this time. The current work around is to use the python source directly and update your python install to support https via openssl.

Feedback and Questions

I have tried to test this as extensively as I can, but doubtless there are many bugs and assumptions which will cause issues for others with their individual TWiki installations. Please provide any feedback you may have to (etaekema at earthlink dot net).


  • Version 0.1.4 - Exceptions were not being handled at all. This is a first cut at sensible exception and error reporting.

  • Version 0.1.3 - This release now handles TWiki forms safely.

  • Version 0.1.2 adds a cgibin configuration file entry to allow users to specific the 'bin' directory that the twiki scripts are in.

  • Version (0.1.1) to address tempfile creation bugs on linux. Thanks to Josh Sled for catching this.

last change 2005-01-02 22:37:36

Creative Commons License
This work is licensed under a Creative Commons License.