I proud to present my implementation of Foobar2000 tagz in perl as Amarok script.
This script can format playlist from a given template and save it to file or put into clipboard (by using syntax of Foobar 2000 tagz: http://wiki.hydrogenaudio.org/index.php?title=Foobar2000%3ATitleformat_Reference)
Script has two implementations: with GUI (needs PerlQT) and without it (if you want to edit config manually). If you don't want to install PerlQt you can edit file $HOME/.pltaf and change properties. It will appear after first run of script. You can find some examples in archive.
Litle HOWTO: When running script (with gui), you can see a window with two text areas, some radiobuttons and four buttons in the bottom. In first text area you should enter the tagz. For example, this: