TinyFugue Scripting

MU* clients come and go, but I end up sticking with TinyFugue for its power, its ability to install anywhere, and most importantly for its ability to run in text-only mode over ssh and screen.

TF Python Patch

TF's scripting while powerful, is old-school and not the easiest thing to work with. I wanted the power of TinyFugue with the ease of a modern scripting language. It turns out to be pretty easy to embed Python into TinyFugue.

Download

[Howto] download and install.

NEW! Jun 25 2009 - There's a new verison of tf-python with two patches applied.

The first is from Jimun Batty and fixes a tf.getvar() path where I missed a Py_INCREF on a borrowed reference - this is a ticking time bomb, and things can take quite a while to explode, but they will eventually.

The second is from Jessica Blank and allows this to compile under OSX!

Sincere thanks to both. The new version is in subversion head and the supplied patch.

You can skip getting the TF raw source and applying the patch by doing an anonymous subversion checkout:
svn co svn://sizer99.com/tf-50b8-py

Otherwise, get [the patch]

Finally, if you still can't compile it on OSX, grab the already compiled tf-python binary (src/tf) and tf-lib/*.py files you can place in your already working tf configuration (make a backup of the tf binary first!)

Examples

[urlwatch.py] is an example of a TinyFugue python script that will watch for urls going by in you worlds and make a html page of them for you to use as a launcher from your browser.

[tfutil.py] is a utility library for your use.

[config.py] lets you edit and save your worlds using a text gui - eventually it should let you edit your key bindings and highlights as well.

[diffedit.py] is an example of a TinyFugue python script that will let you automatically upload only change sets from muf programs or lists instead of reuploading the entire thing.

[tf4.py] will let you (sort of) convert tf5 over to act like tf4's output - it's mostly just an example.

The [help pages] will give you some idea of what can be done as well. NOTE: these are the raw help pages, so they will contain links to other TinyFugue help pages which aren't on this site.

History

DateVersionDescription
2009-06-25v1.10Jimun Batty's PY_INCREF fix.
Jessica Blank's fix to make this compile under OSX.
2008-01-25v1.09Add tf->python conversion for TYPE_ENUM, TYPE_POS
add tfutil.py, convert config.py to use it
add tf4.py as a really obscene example
2008-01-21v1.08don't save virtual worlds at all
2008-01-21v1.07config.py output more readable sorted /addworld format
fix validation of Src Host
Add special save for default/virtual worlds
2008-01-19v1.06Add tf.tfrc() function
add tf-lib/config.py
split out /help tf module to its own file
2008-01-13v1.05Add convenience tf.getvar().
Add tf.send() to avoid tf.eval() quoting hassles
Add diffedit.py utility/example/td>
2008-01-10v1.04Add tf.world() function - it's too useful.
Doc retrieving any var using tf.eval
Fix bug returning string values from tf.eval
2008-01-10v1.03Add dummy sys.argv for libs that expect it.
Be smarter about import/reload to prevent double init.
2008-01-10v1.02document sys.stdout rediection.
2008-01-10v1.01Clarify build docs.
2008-01-10v1.00Initial release.

Native TinyFugue Scripts

Here's [urlwatch.tf], the TinyFugue script version of the url watcher python script. Interesting for a comparison or if you want the functionality without installing the python patch.