create new tag
, view all tags

TWiki External Editor

Announcing edittwiki 0.1.4, an external editor launcher for the popular TWiki wiki. This is similar in spirit to the editMoin tool for MoinMoin wikis. I wrote this in Jython and compiled into a java jar so it should run on a wide set of operating systems. It features a configurable editor setting so you can edit TWiki topics using your favourite editor (including html editors) and works with TWiki installations that are password secured.

This is the initial release, so please be gentle! and feel free to provide feedback here or via email to etaekema-at-earthlink-dot-net.


Here are links to the binary distribution as well as the source code for anyone who had difficulty finding it::


Please see the homepage I've setup for this tool which for now is located here: http://www.pycs.net/users/0000177/stories/14.html (The relevant sections are inserted below -- TW)


Currently edittwiki does not parse the attached forms for TWiki topics which means that when you save the page, it will be saved without the form data. This feature is being added and is targetted for the next (1.1.3) release.


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:

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:

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:

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.

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.

Add-On Installation Instructions

edittwiki is a java application that TWiki users can run on their own machines. It uses the html interface to TWiki to download the source for pages and makes it available to your favourite editor. It then uploads the edits back to TWiki through the /bin/save twiki script so it appears as if you have edited it from the web.

Add-On Info

  • Set SHORTDESCRIPTION = Launch an external editor in your browser

Add-on Author: TWiki:Main/EdTaekema
Add-on Version: 01 Jul 2004 (v1.000)
Change History: 0.1
01 Jul 2004: Initial version
CPAN Dependencies: none
Other Dependencies: none
Java Version: 1.3, 1.4
License: GPL
Add-on Home: http://TWiki.org/cgi-bin/view/Plugins/EditTWikiExternalEditorAddOn
Feedback: http://TWiki.org/cgi-bin/view/Plugins/EditTWikiExternalEditorAddOnDev

Related Topic: TWikiAddOns

-- TWiki:Main/EdTaekema - 01 Jul 2004

Edit | Attach | Watch | Print version | History: r10 < r9 < r8 < r7 < r6 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r10 - 2007-02-10 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.