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:
$ifequal(%list_index%,1, '[spoiler="My playlist"]'$crlf()) ''#%track%'' - ['[color=grey]'%artist% - [%album% - ]'[/color]'] %title% '['%length%']' $ifequal(%list_index%,%list_total%, $crlf()'[/spoiler]')
In second text area you will see the preview of what you will get at last. In my case:
#05 - [color=grey]U2 - U218 Singles - [/color]Vertigo [3:10]
When you sure that your tagz is ready, press 'Run Script' button. The resulting playlist now in the clipboard!
Seven radiobuttons in the right are the seven presets that you can save and use. On the second tab you can find selector between file and klipper and 'browse' button to select file. This option take effect to currently selected preset. I move this selector to the second tab because it is used only once. Buttons in the bottom are:
'Run' script with enterd preferencies,
'save' preferences to config file,
'Ok' for save prefernces and exit,
'Cancel' to exit without doing anything.
Second implementation is mainly aimed to be run from commandline (but still it is nice to use it from amarok if you do not have PerlQt). It has some parameters:
[conf_file FILE] - use config FILE instead of /home/name_no/.pltaf
[template N] - number of template in config file. Use number from 1 to 7.
[store_file FILE] - file where to store result instead of specified in config
[to_klipper 1/0] - if you want to put result into buffer set 1. This will take effect over config.
[templ STRING] - you may give your template here instead of using stored
[playlist FILE] - use playlist FILE in amarok format instead of default.
[track N] - generate result only for specified tracks. Specify list here, e.g. 1,2,3,8-12,14-17,20.
[help] to see this message
You can find PerlQt in your packetmanager or on it's homepage:
For more, you can read the README file.
For license, look at the COPYING file.
For bugreport or featurerequest mail to firstname.lastname@example.org
some foobar-specefic functions are not implemented yet. Also, there is no way to get some meta-info using amarok.
1. I plan to make it amarok-independent for printing contents of directories.
2. Fix all bugs
3. To take over the world