INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Fix Capitalization: Lower Case All Letters Except the First Letter  (Read 3404 times)

vagskal

  • Citizen of the Universe
  • *****
  • Posts: 1227

I have been doing a lot of fixing capitalization lately, using the new RegEx() function. One small addition to the Clean File Properties options that would be really useful when fixing capitalization in non English (or German) languages is a Lower Case All Letters Except the First Letter option. After using the current Lower Case All Letters option I always have to manually fix the very first letter in all song and album names. I do not know of any language where the first letter in the first word in a sentence is not capitalized.

Thanks.
Logged

BryanC

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2574
Re: Fix Capitalization: Lower Case All Letters Except the First Letter
« Reply #1 on: August 31, 2011, 11:42:47 am »

Isn't this an option in "Clean Library Fields?"
Logged

vagskal

  • Citizen of the Universe
  • *****
  • Posts: 1227
Re: Fix Capitalization: Lower Case All Letters Except the First Letter
« Reply #2 on: August 31, 2011, 12:04:00 pm »

Isn't this an option in "Clean Library Fields?"

No, not in the Clean File Properties feature. For Fix capitalization the current alternatives are:
Title Case
Upper Case All Words
Upper Case First Word Only (I really do not know if this option puts the entire first word in upper case letters, or just the first letter in that word)
Upper Case All Letters
Lower Case All Letters

And Lower Case All Letters Except the First Letter is not an option in the FixCase() expression either.
Logged

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: Fix Capitalization: Lower Case All Letters Except the First Letter
« Reply #3 on: August 31, 2011, 01:07:55 pm »

Quote
Upper Case First Word Only (I really do not know if this option puts the entire first word in upper case letters, or just the first letter in that word)

This just capitalizes the first letter of the first word, which is also what FixCase() mode 2 does. Is that not what you're looking for? Or does it not work for languages other than English?
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Fix Capitalization: Lower Case All Letters Except the First Letter
« Reply #4 on: August 31, 2011, 01:51:03 pm »

Something like this?
 
   Regex([Name], /#^([[:punct:]]*\w)(.+)$#/, -1, 1)FixCase([R1], 3)FixCase([R2],4)
Logged
The opinions I express represent my own folly.

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: Fix Capitalization: Lower Case All Letters Except the First Letter
« Reply #5 on: August 31, 2011, 02:28:53 pm »

How is that different than FixCase([Name], 2)?
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Fix Capitalization: Lower Case All Letters Except the First Letter
« Reply #6 on: August 31, 2011, 02:52:13 pm »

   (i could never) give you up   <-- fixcase

vs.

   (I could never) give you up  <-- regex

This is even better than the previous expression:

   Regex([Name], /#^([[:punct:]\d\s]*\w)(.+)$#/, -1, 1)FixCase([R1], 3)FixCase([R2],4)
Logged
The opinions I express represent my own folly.

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: Fix Capitalization: Lower Case All Letters Except the First Letter
« Reply #7 on: August 31, 2011, 03:39:12 pm »

OIC. I'm sure you weren't suggesting it, but this doesn't imply Clean file properties > Fix capitalization or FixCase() should produce the same results. But perhaps it is an argument for including user-defined regex operations in Clean file properties. That would allow us to continue to use that function for that purpose, and select whatever customized tools we need there (e.g., this regex, instead of the built-in Fix capitalization function).
Logged

vagskal

  • Citizen of the Universe
  • *****
  • Posts: 1227
Re: Fix Capitalization: Lower Case All Letters Except the First Letter
« Reply #8 on: September 01, 2011, 03:25:54 am »

Thanks for the replies!

Yes MrC, something like that (but for my purpose I would omit the \d part since "18 bästa" is correct in Swedish).

rick.ca's last comment made me think that what would be really useful/powerful is a way to apply a custom expression to one or more fields in ONLY the selected files. I don't think there is a way to do that now and we only have the predefined clean file properties options and find & replace. This could be an addition to the find & replace function.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Fix Capitalization: Lower Case All Letters Except the First Letter
« Reply #9 on: September 01, 2011, 07:00:36 am »

Thanks for the replies!

Yes MrC, something like that (but for my purpose I would omit the \d part since "18 bästa" is correct in Swedish).

rick.ca's last comment made me think that what would be really useful/powerful is a way to apply a custom expression to one or more fields in ONLY the selected files. I don't think there is a way to do that now and we only have the predefined clean file properties options and find & replace. This could be an addition to the find & replace function.

You're welcome.

You can apply these expressions to fields.

I agree, the find/replace function could use a few more goodies.
Logged
The opinions I express represent my own folly.

vagskal

  • Citizen of the Universe
  • *****
  • Posts: 1227
Re: Fix Capitalization: Lower Case All Letters Except the First Letter
« Reply #10 on: September 01, 2011, 04:39:27 pm »

You can apply these expressions to fields.

Yes, I know that, but not only to the selected files. Applying the same capitalization expression to the [name] field of every music file in the library regardless of the language would not be wise.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Fix Capitalization: Lower Case All Letters Except the First Letter
« Reply #11 on: September 01, 2011, 04:51:55 pm »

I'm confused by that last statement.  I update fields for just the selected files routinely.

Select the files you want to update.  In Action Window > Tag, click desired field to edit, and paste in =expression, hit Enter, and you're done.
Logged
The opinions I express represent my own folly.

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: Fix Capitalization: Lower Case All Letters Except the First Letter
« Reply #12 on: September 01, 2011, 06:27:41 pm »

Quote
Select the files you want to update.  In Action Window > Tag, click desired field to edit, and paste in =expression, hit Enter, and you're done.

True. And to be clear, the point of my suggestion had to do with convenience, not necessity. If one wants to clean file properties, he should find all the tools he may need in Clean file properties. The same idea is already implemented in Rename, move & copy files, where these expressions can be used as rules. As mentioned, it's also applicable to Find & replace, and probably a number of other tools we haven't yet considered.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Fix Capitalization: Lower Case All Letters Except the First Letter
« Reply #13 on: September 01, 2011, 07:44:45 pm »

Yeah, its all good.  We're all on the same page.  Power tools for the power users, and Friendly tools for some extra love.
Logged
The opinions I express represent my own folly.

vagskal

  • Citizen of the Universe
  • *****
  • Posts: 1227
Re: Fix Capitalization: Lower Case All Letters Except the First Letter
« Reply #14 on: September 02, 2011, 12:45:29 am »

I'm confused by that last statement.  I update fields for just the selected files routinely.

Select the files you want to update.  In Action Window > Tag, click desired field to edit, and paste in =expression, hit Enter, and you're done.

Aha, that sounds logical! I have just not tried it (the = thing) that way, only when using the library fields option.
Logged
Pages: [1]   Go Up