How to sort genre (multiple tags) alfabetical?

Someone made me a script in Python to grab Style description of Discogs.com based on Artist - Title as input.
This STYLE tag then gets written to the GENRE tag of the MP3 or FLAC.

So far, so good....
But, I want those tags written in alfabetical order.
This way, It's easier and more systematic if i want to look those songs up in my dj software, sorted by GENRE.

Example input:


Note the way it's not sorted on alfabet in the Style section:
Style: Ballad, RnB/Swing, Contemporary R&B, UK Garage

What I want written in the GENRE tag:
Ballad, Contemporary R&B, RnB/Swing, UK Garage

Is that possible using mp3tag?

There is no sorting function in MP3tag to sort within a string.
But perhaps your software reacts to a list of items separated by "semicolon blank" like Windows Media Player does. With such a list you find a track in a list filtered for each genre in the list., so in your example, you would have 4 places to find the track, in:

  • Ballad,
  • Contemporary R&B,
  • RnB/Swing and
  • UK Garage