twee, the command-line Twee compiler, requires Python. If you are using a Unix-based system like OS X or Linux, you don't need to worry about this requirement; Python should already be installed on your computer. Windows users can get Python here.
On Unix-based systems, you can make the command-line tools available to you by placing the entire extracted directory (including the lib and targets directories) into your PATH. If you use the bash shell, for example, you might put something like this in .bashrc:
export PATH=$PATH:/home/useraccount/twee
You can then run twee directly from the command prompt:
$ twee
On Windows, you can't run twee directly. Instead, you'll need to run the python interpreter on twee like so:
> python twee
If things are set up properly, running twee without any further input should produce this message:
twee: no source files specified
The basic format of a twee command is very simple, and doesn't differ across platforms.
twee sourcefile sourcefile2 sourcefile3... > output.html
You pass it a list of files with source code, and direct its output into an HTML page. There are a few optional switches:
| Switch | Description | Example |
|---|---|---|
| -m | Merges changes with an already existing HTML file. | twee -m oldfile.html mysource.tw > newfile.html |
| -r | When coupled with the -m switch, generates an RSS file of recently changed passages. | twee -m oldfile.html -r rss.xml mysource.tw > newfile.html |
| -t | Targets a different platform when creating the output file. If omitted, this targets jonah. Other available targets include tw (TiddlyWiki 1) and tw2 (TiddlyWiki 2.2). | twee -t tw2 mysource.tw > tiddlywiki.html |