Scripting: Create Decade from Year / Origyear

Are there any good language descriptions for the MTA files?

For example, my intention is to create an action to create a Decade tag using the digits from the Year or Original Year tags, if they exist. Otherwise it is filled with "Unknown".

I somehow figured out how to cobble together a couple of actions in an action group and then hand edit the MTA file, as below, which does seem to work for at least one scenario, but I do have to test all boundary conditions.



Excuse the superflous "$trim". but I did not how to escape the "0" after the "$1" and not make it look like "$10". This is not very elegant. I would love to learn how to script Mp3tag better.

I obviously found one or two pages on scripting and did some trial an error experimentation. I was a programmer in a previous life, though I never used scripting languages and almost never used regexp. I would love any pointers / URLs / Tutorials with annotated examples to improve my scripting of Mp3tag. Any suggestions?

The MTA file resp. its content is subject of the Mp3tag application system and not subject to the common user.
It is not recommended to edit MTA files manually, because of the special sovereign usage by the application itself.
A bad formatted MTA file can cause bad behaviour of the application, which can bring harm to the data and to the user.
If you want to know how to create an action resp. build a group of actions, then read the help manual, and do all changes to the action definitions by using the user interface of Mp3tag.

Yes, you can create an user defined tag-field 'DECADE'.

When the year number is given as format of 'YYYY', what digit is the 'decade digit'?
Or do you want to extract a substring of century and decade digits?

Are you sure to write the text 'Unknown' to the tag-field 'DECADE'?
Be aware of possible formatting problem when displaying the content of the tag-field.
Shouldn't the tag-field better left empty (= not existing)?