MinimServer Forum

Full Version: regular expression in tagUpdate
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
As far as I understood, tagUpdate aims at rewriting tags. An example of this from the user guide:

Quote:@ARTIST=John Eliot Gardiner, The Monteverdi Choir
=ARTIST=The Monteverdi Choir
+CONDUCTOR=John Eliot Gardiner

Question: Is it possible to use regular expressions or something like that for tag rewriting? An example would be:

Quote:@ARTIST=#1, #2
=ARTIST=#2
+CONDUCTOR=#1

which would have the same result as above, but not only for Mr. Gardiner.


Background: I've LOTS of tagged classical music for which no conductor, orchestra and soloists tags are used, but ARTIST is composed of [CONDUCTOR] ", " [ORCHESTRA] "(" [SOLOISTS] ")". A rewriting rule such as

Quote:@ARTIST=#1, #2 ( #3 )
=ARTIST=#2
+CONDUCTOR=#1
+SOLOISTS=#3


would be very handy Blush


Thanks in advance, Hafer
(25-10-2014 17:20)Hafer Wrote: [ -> ]As far as I understood, tagUpdate aims at rewriting tags. An example of this from the user guide:

Quote:@ARTIST=John Eliot Gardiner, The Monteverdi Choir
=ARTIST=The Monteverdi Choir
+CONDUCTOR=John Eliot Gardiner

Question: Is it possible to use regular expressions or something like that for tag rewriting? An example would be:

Quote:@ARTIST=#1, #2
=ARTIST=#2
+CONDUCTOR=#1

which would have the same result as above, but not only for Mr. Gardiner.

This isn't possible.

Quote:Background: I've LOTS of tagged classical music for which no conductor, orchestra and soloists tags are used, but ARTIST is composed of [CONDUCTOR] ", " [ORCHESTRA] "(" [SOLOISTS] ")". A rewriting rule such as

Quote:@ARTIST=#1, #2 ( #3 )
=ARTIST=#2
+CONDUCTOR=#1
+SOLOISTS=#3


would be very handy Blush


Thanks in advance, Hafer

You can use tag formattting to do this.
(25-10-2014 17:32)simoncn Wrote: [ -> ]
Quote:Background: I've LOTS of tagged classical music for which no conductor, orchestra and soloists tags are used, but ARTIST is composed of [CONDUCTOR] ", " [ORCHESTRA] "(" [SOLOISTS] ")". A rewriting rule such as

Quote:@ARTIST=#1, #2 ( #3 )
=ARTIST=#2
+CONDUCTOR=#1
+SOLOISTS=#3


would be very handy Blush

You can use tag formattting to do this.

Sorry, I didn't get this; I want to decompose a given string (consisting of conductor, Orchestra and soloists (in brackets)) into pieces and assign them to CONDUCTOR, ORCHESTRA and SOLOISTS. From the user guide I can't find a clue how to do that with tagFormat. Any hints?
(25-10-2014 17:55)Hafer Wrote: [ -> ]Sorry, I didn't get this; I want to decompose a given string (consisting of conductor, Orchestra and soloists (in brackets)) into pieces and assign them to CONDUCTOR, ORCHESTRA and SOLOISTS. From the user guide I can't find a clue how to do that with tagFormat. Any hints?

You're correct that tagFormat doesn't do decomposition. You would need to use a tagging program such as Mp3tag to do the decomposition using regular expressions and then use tagFormat to combine the decomposed elements however you wish.
(25-10-2014 17:59)simoncn Wrote: [ -> ]You would need to use a tagging program such as Mp3tag to do the decomposition using regular expressions and then use tagFormat to combine the decomposed elements however you wish.

After (unsuccessful) trying to get around that I took a breath and simply did it. Took me the better part of the weekend Blush but got me where I wanted to be.

Thx, Hafer
Reference URL's