sort according to partial comment?


#1

Hi,

for quite a while now I have been looking for a software that would do the following trick for me: In the comment tag of my mp3s I saved the names of the musicians, for instance three different comment tags might be:

1.mp3: Chick Corea (p), Bobby McFerrin (voc)
2.mp3: Chick Corea (p)
3.mp3: Chick Corea (p), Bobby McFerrin (voc), Peter Merry (b)

Now I would like to create huge lists of musicians, as in:

Bobby McFerrin (voc): 1.mp3, 2.mp3
Chick Corea (p): 1.mp3, 2.mp3, 3.mp3
Peter Merry (b): 3.mp3

Is there any way I can get mp3tag to do this for me? It seems fairly complicated, as it involves sorting according to only parts of the comment...

Thanks a lot,
Johannes.


#2

I think it's possible to do with some different software, not mp3tag:

  1. add your files into a program that is able to produce a report file (txt,csv,etc)
  2. make the report
  3. the following is tricker because I suppose there is no existing software doing exactly what you want: you should parse the report (the COMMENT filed) and produce the desired list -->

If (you know programming) {
you could do it rather easily
} else {
ask your friends to process the report :slight_smile:
}

Probably even me could write some script for you. In such case send me a .col file produced by the http://mac.sf.net/ software and I will play with it.

If there is an existing way I would be glad to know about it instead to code :slight_smile:


#3

I'm afraid I have to give up my own attempts to code something. I thought I had figured out something, but then it doesn't return the value I expect even at such an early stage, so if you're still happy to code, zencd, I'd be very glad... I've sent you a PM with a trifle more detail.

Just if anyone can spot my mistake at first glance:

$filename(txt)$loop(performer)$put(comm_per,%comment%)$put(performer,$mid(comm_per,$strstr(performer,', ')-1,1))$loopend()

or, a bit more step-by step:

$put(comm_per,%comment%) // assigns comment value to comm_per
$strstr(comm_per,', ') // search for ", " in comm_per ->position is lenght+1 of first artist
$put(performer,$mid(comm_per,$strstr(performer,', ')-1,1)) //as many characters of performer as found with $strstr are copied via $mid to performer

Thanks for your time and effort, zencd and everyone looking at this,
Johannes.


#4

I am playing with Python language - cannot even imagine how to do it with mp3tag's facilities