The latest development build 3.31k (2025-11-07)
- NEW: added function
SayFormatto Web Sources Framework.
This new feature now allows the use of (probably) all of the funtions documented in Scripting Functions – Mp3tag Documentation even in websource scripts. Here are a few examples for deduplication and sorting a string containing a list of comma separated entries:
set "Teststring" "CD,CD,CD,CD,CD,CD,CD,Blu-Ray,Blu-Ray,Blu-Ray,Vinyl"
# Deduplication
OutputTo "Deduplicated"
sayformat "$dedup(%Teststring%,',',1)"
# Sorting
OutputTo "Sorted"
sayformat "$sort(%Teststring%,',')"
# Sort and Dedup
OutputTo "Sort and Dedup"
sayformat "$sort($dedup(%Teststring%,',',1),',')"
These examples refer to How to prevent duplicate tags in Websources Script? and Scripting-Funktion zum Löschen doppelter Einträge and show how easy and simple the problem now can be solved.
The next example deals with calculating the total number of tracks of an album by using the length of a string that contains a vertical bar for every track in that album:
# Calculation of the total number of Tracks
set "Tracks" "|||||"
# Number of Tracks is number of vertical bars in output buffer "Tracks"
outputto "Totaltracks"
SayFormat "$len(%Tracks%)"
This exampla is taken from Counting tracks.
These solution of the above tasks with the new sayformat function are almost trivial (and creative programmers have become nearly obsolete
). Please let me know if you have more examples for using that new function.
Edit: Sorry I forgot to show the result of the test examples:
