Help with roman numerals?

So, I'm pretty sure that I could solve this problem with regular expressions, but I don't actually know how to use them.

I've just been given a HUGE batch of Shakespeare mp3s. The track titles are in a number of different formats:

Scene I Act i
Scene 1 Act 1
Scene I Act I

and all possible variations of capitalization in the "scene" and "act".

What I would like to do is just change the whole batch to the format I i (where uppercase represents scene and lowercase represents act).

Is there anyone willing to help me out with this project? I could do them individually, but it would take days and days...

Thanks!

To know or not to know - that's the question.
What did you do to learn about and solve your problems with Regular Expression?

Well this seems to be easy or not. :wink:

The Filename can be broken down into four parts, i. e. "word number word number", delimited by space character.
You can split the filename and save the parts separately into four temporary tagfields, say TMP1, TMP2, TMP3, TMP4. Use action "guess values" or "format value with $regexp()" or other Mp3tag scripting functionalities to solve this step.

TMP1 and and TMP3 needs simple adjusting on casing, so use the Mp3tag standard function.

TMP2 and TMP4 needs harder work, because the numbers can be either of type arabic or roman.
For further help and tools read there:
Converting roman to arabic number and vice versa
Regular Expression für Römische Ziffern

If the temporary tag fields got all their correct content, then combine them into a temporary tagfield TMP5, give it the structure as of the wanted filename. Use simply "format value" with a formatstring of "%TMP1% %TMP2% %TMP3% %TMP4%"

If all looks ok then set the actual filename using "format value" with the content of TMP5.
Afterwards remove the temporay tagfields using the remove tag fields action.

That's all.

DD.20100324.0954.CET

Thank you very VERY much! :slight_smile: !

I've started working on this only to find that I have no clue as to how to save values to a temporary tag file.

(also no idea how to deal with the scripting. Is that all done through the "actions" tab?)

I tried using the "guess values" action as you suggested. If I understand correctly, I use %title% as the source, and either "TMP1 TMP2 TMP3 TMP4" or "TMP1 / TMP2 / TMP3 / TMP4" as the guessing pattern?

I tried doing that and then doing "format value" with the value being %title% and format string being %TMP2% %TMP4%, with the idea that it might at least show me whether or not anything had been saved for TMP2 & TMP4. Apparently nothing had, because the titles all ended up blank.

Sorry for being such a pain.

Guess values:
Source: %title%
Pattern: %TMP1% %TMP2% %TMP3% %TMP4%

Check with "View > Extended Tags" if it worked.

Syntax for format value:
Field: TITLE
Format string: %TMP2% %TMP4%

MUCH better. Thanks!

One last idiotic question and I should be done. I'm having trouble with, of all things, the case conversion.

I now have the second part of the title (the "act") stored as %TEMP2%. I want to convert all %TEMP2% to lower case letters.

I am using the case conversion action with %TMP2% set as the field, and lower case set as the case conversion. I have tried leaving the last bit (the "words begin from...etc) blank, tried setting it as "I; V; X", and tried setting it as ' ' (would that be the proper way to indicate a space?).

None of these have worked. What am I missing?

Thanks again for putting up with me.

No % signs in the field, so just TMP2

And "words begin from.." = blank.

Got it. I'll leave y'all in peace now. Thanks again!