Listing all tagged fields in the tag panel

Listing only hidden fields in the tag panel

Perhaps this is also a solution for this thread.

Field: _FORMAT
Name: List of hidden fields
Value:

$replace($regexp($regexp($regexp($regexp($sort($regexp($regexp($list(๐Ÿฆ•,:$repeat($char(9),4),๐Ÿฆ–,\\),๐Ÿฆ•(?:album(?:artistsort|artists?|sort)?|artist(?:sort|s)?|barcode|catalognumber|co(?:mment|mposer|pyright)|description|dis(?:ambiguation|cnumber|csubtitle|ctotal)|genre|isrc|label|lyricist|mediatype|mb_artistcredit_artist_country|musicbrainz_(?:(?:album(?:artistid|id|releasecountry|status|type))|artistid|release(?:groupid|trackid)|trackid)|originalyear|publisher|setsubtitle|title|track(?:total)?|version|year):\t'['^๐Ÿฆ–']'+๐Ÿฆ–,,1),(?<=๐Ÿฆ•)('['a-zA-Z_ #\d']'+:\t++(?='['^๐Ÿฆ–']'{68})'['^๐Ÿฆ–']'{67})'['^๐Ÿฆ–']'*,$1โ€ฆ),๐Ÿฆ–),\r?\n,โ†ต),(?<=๐Ÿฆ•)('['^:']'{1','31})(:\t+'['^๐Ÿฆ–']'{1','36})(?=๐Ÿฆ–),\U$1\E$2\r\n),(?|(?<=๐Ÿฆ•)('['a-zA-Z_ #\d']'{32','}:)\t+('['^๐Ÿฆ–']'+)(?=๐Ÿฆ–)|(?<=๐Ÿฆ•)('['a-zA-Z_ #\d']'+:)\t+('['^๐Ÿฆ–\n']'{36','}))(?=๐Ÿฆ–),\U$1\E\r\n        $2\r\n),(?<=๐Ÿฆ•)(?|('['A-Z_ #\d']'{1','7}:\t{4})\t*|('['A-Z_ #\d']'{8','16}:\t{3})\t*|('['A-Z_ #\d']'{16','23}:\t{2})\t*|('['A-Z_ #\d']'{24','30}:\t)\t*|('['A-Z_ #\d']'{31}:)\t*),$1),๐Ÿฆ•,,๐Ÿฆ–,)

Type: Multiline
Rows: 4

Breakdown

Field: TEST1
Format string:

$list(๐Ÿฆ•,:$repeat($char(9),4),๐Ÿฆ–,\\)

Creates the initial tag-value pairs, separated by : and 4 tabs, wrapped into ๐Ÿฆ• and ๐Ÿฆ–.

Field: TEST2
Format string:

$regexp(%test1%,๐Ÿฆ•(?:album(?:artistsort|artists?|sort)?|artist(?:sort|s)?|barcode|catalognumber|co(?:mment|mposer|pyright)|description|dis(?:ambiguation|cnumber|csubtitle|ctotal)|genre|isrc|label|lyricist|mediatype|mb_artistcredit_artist_country|musicbrainz_(?:(?:album(?:artistid|id|releasecountry|status|type))|artistid|release(?:groupid|trackid)|trackid)|originalyear|publisher|setsubtitle|title|track(?:total)?|version|year):\t'['^๐Ÿฆ–']'+๐Ÿฆ–,,1)

This is the filter and the main difference to v2.0. You need to add all tag names that you have as fields in your tag panel in the alternation so they get removed from the _FORMAT field.

Example:
When you only have TITLE, ALBUM, ARTIST and YEAR in your tag panel,

$regexp(%test1%,๐Ÿฆ•(?:title|album|artist|year):\t'['^๐Ÿฆ–']'+๐Ÿฆ–,,1)

would be correct. This regex is case insensitive so it doesn't matter if you use ALBUM or Album or album.
You can also use this filter to hide tags you don't need/want to see. An example would be ReplayGain tags if your workflow includes a step that ensures they are always populated.

Field: TEST3
Format string:

$sort($regexp(%test2%,(?<=๐Ÿฆ•)('['a-zA-Z_ #\d']'+:\t++(?='['^๐Ÿฆ–']'{68})'['^๐Ÿฆ–']'{67})'['^๐Ÿฆ–']'*,$1โ€ฆ),๐Ÿฆ–)

Trims tag values that are longer than 67 chars, appends โ€ฆ when a value was trimmed and sorts the result alphabetically.

Field: TEST4
Format string:

$regexp(%test3%,\r?\n,โ†ต)

Replaces both Windows and Linux style newlines in tag values with โ†ต.

Field: TEST5
Format string:

$regexp(%test4%,(?<=๐Ÿฆ•)('['^:']'{1','31})(:\t+'['^๐Ÿฆ–']'{1','36})(?=๐Ÿฆ–),\U$1\E$2\r\n)

Adds newlines after tag value pairs where neither the tag name exceeds 31 chars nor the tag content 36 and also converts the tag name case to uppercase.

Field: TEST6
Format string:

$regexp(%test5%,(?|(?<=๐Ÿฆ•)('['a-zA-Z_ #\d']'{32','}:)\t+('['^๐Ÿฆ–']'+)(?=๐Ÿฆ–)|(?<=๐Ÿฆ•)('['a-zA-Z_ #\d']'+:)\t+('['^๐Ÿฆ–\n']'{36','}))(?=๐Ÿฆ–),\U$1\E\r\n        $2\r\n)

When tag value or name exceed the length limits, this moves the value to a new line, prepends 8 spaces and also converts the tag name case to uppercase.

Field: TEST7
Format string:

$regexp(%test6%,(?<=๐Ÿฆ•)(?|('['A-Z_ #\d']'{1','7}:\t{4})\t*|('['A-Z_ #\d']'{8','16}:\t{3})\t*|('['A-Z_ #\d']'{16','23}:\t{2})\t*|('['A-Z_ #\d']'{24','30}:\t)\t*|('['A-Z_ #\d']'{31}:)\t*),$1)

This handles the actual formatting/padding. Depending on the length of the tag name, the 4 initially added tab characters are partially removed to adjust the padding.

The numbers I use come from me creating test tags with Z (medium size uppercase) letters from 1 Z all the way to 31 ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZs and noting down how many tabs were required to align the tag values in Mp3tag.
This depends on the font used and can vary from tag name to tag name. You can add specific cases before the general cases in the alternation to handle outliers.

Field: TEST7
Format string:

$replace(%test6%,๐Ÿฆ•,,๐Ÿฆ–,)

This removes the opening Sauropod and the closing T-Rex at last.

Test actions for the hidden fields only version:
__HIDDEN_FIELDS_TESTS.mta (1.6 KB)

And for people who are only interested in this version, here's a repeat of the regex formatting tricks:

Regex format string trick

Here's a trick if you want to test or change my regexes on regex101 for example:
Since ,, [ and ] need to be escaped in format strings, I created these quick and dirty conversion regexes to escape/unescape regexes. I don't claim that they always work, but for the regexes I used in this case, they did as I did not use literal [],' in them.

Escape for Mp3tag format string

Unescape to test regex