Change to UPPERCASE all occurrences of any word in a list found in several fields


#1

I have taken advice from @ryerman and started a new thread so that I can get an answer by providing a more detailed explanation of what I need to achieve using mp3tag in the hope that you can better assist me.

I have a list of artists that I want mp3tag to find in fields such as ARTIST, ALBUMARTIST, TITLE (and preferably FILENAME):

abba|adda|absrdst|acdc|ac dc|akdong musician|bkpr|blk jks|bts|chllngr|chvrches|chll pll|dfrnt|diiv|dmc|dnce|drwn|dtcv|dwntwn|dvsn|dvsr|exo-k|grmln|haim|htrk|hxlt|inxs|jmsn|jpnsgrls|kaytranada|kda|kshmr|ladybaby|lany|lee hi|lndn drgs|lnzndrf|lvthn|mgmt|mika|mnek|mndrmnek|ms mr|mstrkrft|n sync|nsync|partynextdoor|pwr bttm|pza|rdgldgrn|rkcb|rlyr|rÜfÜs du sol|rvivr|ry x|sbtrkt|shxcxchcxsh|sophie|stnnng|strfkr|swmrs|tnght|tr/st|tts|tstr|walk the moon|wzrd|u2|u-kiss|unkle|wstrn|xtrmst|zayn

When it finds an exact match in any/all fields, it should force UPPERCASE for all instances found in each field. It should be a strict search that looks for exact matches of the above (like 'n sync'). It should not force uppercase if it finds 'n' or 'sync' on their own (for example).

It should require only one action (not one action group) and one list, preferably incorporated within the action, but located in a text file if necessary.

We have experimented with guess values in the previous thread without success due to my limited knowledge, experience or understanding (although I am trying my best) of the regexp language.

I look forward to hearing from you


Combining 'replace with' [empty] in multiple fields action
#2

I would run an action that changes the case of each first letter in a word first (or, if you like, at least in the names and not conjunctions and stuff). Like that you get (e.g.) Abba in all cases and not "Abba" or "abba".
Use an action of the type "Format value" (to try if your list works)
Field: ARTIST
Format string: $replace(%artist%,Abba,ABBA,Adda,ADDA)
(and so on with up to 30 pairs, I think)
You would have to complete your action with the full list.
It could be that you have to split the list to several actions due to the 30 pairs limit.


#3

@sheepdisease
Here is a script that seems to do what you want.

UPPER case for specified artists in ARTIST, ALBUMARTIST, TITLE, _FILENAME .mta (879 Bytes)

But it is a group with 6 actions, not a single action.
However, there is only one artist list to maintain within the action group.
Maybe it is possible to do the same thing in a single action, but I think the disadvantages out-weigh the advantages: I didn't try.

The first "Format value" action creates the ARTIST_LIST field .
The screen-shot shows a truncated list, but the script has your full list.
The artist names must be separated by the pipe (|) and case is unimportant.
First%20action%20-%20Create%20ARTIST_LIST

The following "Format value" actions use a $regexp function that expands %artist_list% as part of the regular expression.
That is why it is important to use a pipe to separate the entries in the artist list.
There is one action for every field that is to be changed.
Titles like "Sophie Rose-Rosalee" by Wynton Marsalis may give undesired results because they contain the name of a listed artist.
Example%20action%20-%20change%20to%20UPPER%20case

The last action removes the temporary ARTIST_LIST field.
Last%20Action%20-%20remove%20ARTIST_LIST


#4

Thanks for your replies.

The action you have shared seems to work perfectly on testing! I added it to my all-in-one action and it functions as you would expect.

I am extremely happy with the information and support provided in this thread! Thank you so much.