Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Script Help (Read 1683 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Script Help

Hi guys!  :)

I'm afraid need a little help. My entire digital record collection has tons of information in square brackets. I'd like to replace them with round brackets instead. Years ago I've found the string down below on MusicBrainz which cleans up most of the incorrect spellings. Could anyone please insert the replacement for the brackets, so that e.g. [demo] turns into (demo)? I'm visually impaired and have a very hard time to even read that kind of text. Is there maybe some sort of generator for stuff like this that helps creating proper strings?

Any help is greatly appreciated.

Mike


Quote
$replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($caps2(%title%),' A ',' a '),' An ',' an '),' The ',' the '),' And ',' and '),' But ',' but '),' Or ',' or '),' Nor ',' nor '),' At ',' at '),' By ',' by '),' For ',' for '),' From ',' from '),' In ',' in '),' Into ',' into '),' Of ',' of '),' Remix) ',' remix) '),' On ',' on '),' Onto ',' onto '),' O' ',' o' '),' Mix) ',' mix) '),' To ',' to '),' 'N' ',' 'n' '),' With ',' with '),' As ',' as ')

 

Re: Script Help

Reply #1
You don't have to nest $replace like that. It takes multiple pairs like this...

$replace($caps2(%title%),WHAT1,WITH1,WHAT2,WITH2)

You need to wrap ()[] in apostrophes to escape them like this '('

$replace($caps2(%title%),'[','(',']',')')

You don't need them around plain characters/spaces.

Re: Script Help

Reply #2
tons of information in square brackets. I'd like to replace them with round brackets instead
I wouldn't do that. There are so many track titles that have round parenthesis, and you will then lose the distinction between track title and "other information".
Rather try to single out what is, say, a different version and use a tag for that.