Demogorgo
Mar 7 2007, 23:33
Is there a way to make some kind of global functions for masstagger? I have a lot of complexity and redundancy in my tagging scripts. I have attached a screenshot for an example.

My scripts are very tedious to manage right now. It's mostly due to the formatting that I do to each field after scanning from filenames. If it's not possible to use custom functions, is it at least possible to combine those replace() calls?
gfngfgf
Mar 7 2007, 23:45
^ yes to your last question. Something like:
CODE
$replace(%artist%,_, ,;,:,etc...)
should work fine.
wraithdu
Mar 8 2007, 00:06
To be more generic, the wiki explains the $replace() function well -
$replace(a,b,c)
Replaces all occurrences of string b in string a with string c.
Can also be used with an arbitrary number of arguments. Note that $replace(a,b1,c1,b2,c2) is generally not the same as $replace($replace(a,b1,c1),b2,c2).
Example: $replace(ab,a,b,b,c) → "bc", $replace($replace(ab,a,b),b,c) → "cc"
Demogorgo
Mar 8 2007, 22:16
Thanks for explaining that function in detail. I did read the title formatting document, but didn't see the full useage of $replace. It would be great to have global functions, but now I can reduce 12 lines to 3 and just copy the smaller templates around. Thanks.