Keep The Case Of Certain Words


So I'm on a roll this week tagging a bunch of stuff I recently got from a friend.
Much of the files are from CD Singles, EP's and what not.

I use the Case Conversion action quite a lot and was wondering if there was something I could do to make it ignore certain words or sequences of characters when it runs.

I looked around here and couldn't find anything pertaining to this directly.

For instance, if the Album has "EP" or "CD-Single" after it, I would like to keep these from being changed to "Ep" or "Cd-Single". Or, if the artist is LCD Soundsystem, make it so the action does not change it to Lcd, etc..

I don't see an option to add this ability to the Case Conversion function, so I was wondering if I could make a Case Conversion group and add another action to "keep the case of certain words" or something like that.



It's a two step operation:

  • first do you normal case conversion.
  • then do a set of replaces for your exceptions.

You do that best with regular expressions, because normal replaces can't differntiate "EP" from "epic".
You can combine the case conversion and the various replace actions in one action group, so one you have stored this action group, it's just one click.


There are at least 2 approaches - and both of them do not use the case conversion function itself:
One: if you have already those words in capitals then you could keep them with the function $caps2.
You create an action of the type "Format tag field" for the field and enter as format string:
See the help for the details.

Two: assemble a list of words that have to be spelled in a particular way and put this list into an (ever increasing) list of actions of the type "Replace" ...

But perhaps you need both ways.


I just stored this action group for myself:

Action 1: Case Conversion
Field: ALL
Conversion: Mixed Case
Words begin from/after any of: {[(-

Action 2: Replace with regular expression
Field: _ALL
Regular expression: (^|\W)(ep|dj|mc|lcd|cd)(?=\W|$)
Replace matches with: $1$upper($2)

Action 3: Replace with regular expression
Field: _ALL
Regular expression: (^|\W)(vs|feat|and)(?=\W|$)
Replace matches with: $1$lower($2)

I guess I will expand the lists in action 2 & 3 from time to time. Generally I don't care so much about cases and as I use web sources a lot, most of my files have correct cases.
You get the logic? You can expand the list in the second parentheses of the replace with regexp actions as long as you want.

I changed the regexp a little to catch also cases where the of the expression follow each other, like "DJ EP".