Skip to main content

Topic: "Undoing" AutoCapitilise ? (Read 10802 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • swayzak
  • [*][*][*]
"Undoing" AutoCapitilise ?
hi

After a few too many glasses of wine (  ) I stupidly Capitilised my entire 160GB music collection - thereby correcting some annoying problems with letters, but creating annoying problems

e.g all "DJ"s became Dj, MCs to Mc, vol II to vol Ii, CD1 to Cd1 etc.

Is there anyway I can correct this relatively painlessly ?


PS. FB2K is far to powerful a tool to be toyed with on alcohol ...

  • Andreasvb
  • [*][*][*][*][*]
"Undoing" AutoCapitilise ?
Reply #1
You can use Mp3tag and create actions that replaces specific words.

I've several for e.g.
dj = DJ
Ft. = feat.
Vs = vs.

It's very powerful, and free.

Give it a try.
Windows 10 Pro x64 // foobar2000 1.3.10

  • swayzak
  • [*][*][*]
"Undoing" AutoCapitilise ?
Reply #2
You can use Mp3tag and create actions that replaces specific words.

I've several for e.g.
dj = DJ
Ft. = feat.
Vs = vs.

It's very powerful, and free.

Give it a try.



thanks

just installed it & will give it a go !

PS Is this program better suited than FB2K to do this ?
  • Last Edit: 07 November, 2008, 07:40:49 PM by swayzak

  • Yirkha
  • [*][*][*][*][*]
  • Moderator
"Undoing" AutoCapitilise ?
Reply #3
Awfully late, however:
Properties for all items > Right-click on "Track title" whatever you mangled > Format from Other Fields... > "$replace(%title%,Dj,DJ,Mc,MC,Ii,II,Cd,CD)" etc. > Review, apply.
Full-quoting makes you scroll past the same junk over and over.

  • ExUser
  • [*][*][*][*][*]
  • Read-only
"Undoing" AutoCapitilise ?
Reply #4
PS Is this program better suited than FB2K to do this ?


IMO, not at all. There have been a few people recommending third-party software for tasks that foobar2000 can perform lately. This is silly and should stop.

  • Lyx
  • [*][*][*][*][*]
"Undoing" AutoCapitilise ?
Reply #5
Here's a better fix, since i became "victim" of the same problem a while ago:

Code: [Select]
[$trim($replace($meta(title)' ',' ep ',' EP ',' Ep ',' EP ',' cd ',' CD ',' Cd ',' CD ',' dj ',' DJ ',' Dj ',' DJ ',' Ii ',' II ',' Iii ',' III ',' Iv ',' IV ',' Vi ',' VI ',' Vii ',' VII ',' Viii ',' VIII ',' Ix ',' IX '))]


Replace $meta(title) with any field of your choice.


Explanation:
This avoids three issues. First, by making the whole string [conditional], the return will never be "?" and therefore the field will not be created if it doesn't exist. Second, by using $meta() it avoids fieldremappings. Third, by first adding a space to the end of the value and then trimming it away again, you avoid accidentally doing false matches. For example, ' ep' would also match ' episode', thus turning it into ' EPisode'. Since there is no way to define "end of value", i simply cheat by first adding a space to the end of the value, so that we can just match ' ep '. Then after the replacement i $trim the space away again.
I am arrogant and I can afford it because I deliver.

  • Frank Bicking
  • [*][*][*][*][*]
  • Global Moderator
"Undoing" AutoCapitilise ?
Reply #6
You don't actually need any of those apostrophes:

Code: [Select]
[$trim($replace($meta(title) , ep , EP , Ep , EP , cd , CD , Cd , CD , dj , DJ , Dj , DJ , Ii , II , Iii , III , Iv , IV , Vi , VI , Vii , VII , Viii , VIII , Ix , IX ))]

  • Lyx
  • [*][*][*][*][*]
"Undoing" AutoCapitilise ?
Reply #7
Same reply as yesterday. If whitespace is important, i prefer to explicitely quote it, regardless of it not being "required".

If you can give me a hint how i can set a monospace font for all formattingstring inputareas in fb2k, i may drop that habbit :)
  • Last Edit: 07 November, 2008, 08:49:12 PM by Lyx
I am arrogant and I can afford it because I deliver.

  • Lyx
  • [*][*][*][*][*]
"Undoing" AutoCapitilise ?
Reply #8
P.S.:

Doing such replacement operations for MC can result in false matches, because there IS an abbreviation which is capitalized as "Mc". You dont want "Mc Donalds" turned into "MC Donalds", right? For that case, better do a manual DB search and then apply a fix to handselected set of tracks.
I am arrogant and I can afford it because I deliver.

  • kwanbis
  • [*][*][*][*][*]
  • Developer (Donating)
"Undoing" AutoCapitilise ?
Reply #9
Second, by using $meta() it avoids fieldremappings.

Sorry, what do you mean?

  • Lyx
  • [*][*][*][*][*]
"Undoing" AutoCapitilise ?
Reply #10

Second, by using $meta() it avoids fieldremappings.

Sorry, what do you mean?

Example: %title% will use the filename if the title-field is missing. In masstagging-scripts however, you typically do not want a file which as no title to get the filename applied as title. Especially not in a script which is supposed to only correct wrong capitalization.
I am arrogant and I can afford it because I deliver.

  • kwanbis
  • [*][*][*][*][*]
  • Developer (Donating)
"Undoing" AutoCapitilise ?
Reply #11
Example: %title% will use the filename if the title-field is missing. In masstagging-scripts however, you typically do not want a file which as no title to get the filename applied as title. Especially not in a script which is supposed to only correct wrong capitalization.

really? i never seen that behavior before, and i use masstager, a lot (not that it means that i know it ).

so you mean that if i have a script like:

Format Value: Destination Field: TITLE: Formating Pattern: $ansi(%title%)

but there is no TITLE field, i would get $ansi($filename)?

  • Lyx
  • [*][*][*][*][*]
"Undoing" AutoCapitilise ?
Reply #12
Just tested - the answer is "yes".
I am arrogant and I can afford it because I deliver.

  • swayzak
  • [*][*][*]
"Undoing" AutoCapitilise ?
Reply #13
Wow - so many further helpful replies ! Thanks.

However, I have again consumed several glasses of red wine so will refrain from implementing suggestions until tomorrow ... 

  • swayzak
  • [*][*][*]
"Undoing" AutoCapitilise ?
Reply #14
Wow - so many further helpful replies ! Thanks.

However, I have again consumed several glasses of red wine so will refrain from implementing suggestions until tomorrow ... 


Actually that's a lie.

Here is a first attempt using "title" - the new value for Roman numerals is unchanged !? Am I doing something wrong ?



  • Lyx
  • [*][*][*][*][*]
"Undoing" AutoCapitilise ?
Reply #15
Works here with 0.9.6 beta. The behaviour of that input-field by the way is VERY WEIRD here (inputfield-limit is set by window-width - and no scrolling allowed).

edit: inputfield length issue described above was reported and verified.
  • Last Edit: 08 November, 2008, 08:52:30 PM by Lyx
I am arrogant and I can afford it because I deliver.

  • Yirkha
  • [*][*][*][*][*]
  • Moderator
"Undoing" AutoCapitilise ?
Reply #16
You'd need to add another space between "$replace(" and "$meta" for it to work at the beginning of the title. As well as add another set with a dot for it to work with titles like "Ii. Adagio".
Full-quoting makes you scroll past the same junk over and over.

  • swayzak
  • [*][*][*]
"Undoing" AutoCapitilise ?
Reply #17
You'd need to add another space between "$replace(" and "$meta" for it to work at the beginning of the title. As well as add another set with a dot for it to work with titles like "Ii. Adagio".


Brilliant - thanks again.

There does seem to be a character limit though - after adding most Roman numerals with dots I couldn't type in V. . It just wouldn't let me.

ie. I got as far as :

[$trim($replace( $meta(title) , ep , EP , Ep , EP , cd , CD , Cd , CD , dj , DJ , Dj , DJ , Ii , II , Iii , III , Iv , IV , Vi , VI , Vii , VII , Viii , VIII , I. , I , Ix , IX , Ii. , II , Iii. , III , Iv. , IV , Vi. , VI , Vii. , VII , Viii., VIII , Ix. , IX , X. , X , Xi. , XI , Xii. , XII , Xiii. , XIII , Xiv. , XIV  ))]
  • Last Edit: 09 November, 2008, 06:04:42 AM by swayzak

  • swayzak
  • [*][*][*]
"Undoing" AutoCapitilise ?
Reply #18
I've tried to adapt that string to correct the album field as well - but it seems to still want to change the title field .. ??




Am I doing this wrong ?

  • Yirkha
  • [*][*][*][*][*]
  • Moderator
"Undoing" AutoCapitilise ?
Reply #19
The column "Title" is apparently only for reference, the old value of the field you selected is not shown.
Full-quoting makes you scroll past the same junk over and over.

  • swayzak
  • [*][*][*]
"Undoing" AutoCapitilise ?
Reply #20
The column "Title" is apparently only for reference, the old value of the field you selected is not shown.


Ah - so if I go with this, I'm not going to rename all those tracks to the new album value ?

  • Yirkha
  • [*][*][*][*][*]
  • Moderator
"Undoing" AutoCapitilise ?
Reply #21
No.
Besides, no changes are done to your files until you close the Properties dialog, so you can safely verify the result. You would save yourself a lot of time if you had just tried it right away.
Full-quoting makes you scroll past the same junk over and over.

  • swayzak
  • [*][*][*]
"Undoing" AutoCapitilise ?
Reply #22
Thanks.

Does FB2K have an undo function that could correct "accidental" massive changes like this ?

That would be very useful ....

  • Yirkha
  • [*][*][*][*][*]
  • Moderator
"Undoing" AutoCapitilise ?
Reply #23
No.
The closest you can get to such a feature would probably be opening the Properties dialog twice - once for managing, once as a backup. Then if something goes wrong, you'd display another Properties, copy all data from the backup one to the new one and rewrite it back. (Simply pressing OK on the backup dialog wouldn't work, as it doesn't write anything if no items were changed in it.)
Full-quoting makes you scroll past the same junk over and over.

  • swayzak
  • [*][*][*]
"Undoing" AutoCapitilise ?
Reply #24
OK - thanks. That's useful to know ..