Então, basicamente, estou tentando obter a classificação de um mp3 programaticamente e, usando a ferramenta de linha de comando id3v2, posso obter a classificação que o meu programa coloca:
$ id3v2 -R Drake\ -\ Over3.mp3
id3v1 tag info for Drake - Over3.mp3:
Title : Over Artist: Drake
Album : Thank Me Later Year: 2010, Genre: Unknown (255)
Comment: The highly anticipated debut Track: 0
id3v2 tag info for Drake - Over3.mp3:
TPE2 (Band/orchestra/accompaniment): Drake
TIT2 (Title/songname/content description): Over
TPE1 (Lead performer(s)/Soloist(s)): Drake
TALB (Album/Movie/Show title): Thank Me Later
TYER (Year): 2010
TCON (Content type): Rap - Hip-Hop (255)
TPUB (Publisher): Cash money/Universal Motown
POPM (Popularimeter): Windows Media Player 9 Series, counter=0 rating=196COMM (Comments): (MusicMatch_Preference)[eng]: Very Good
COMM (Comments): ()[eng]: The highly anticipated debut from Drake is here! "Thank Me Later" is hotest album in the game.
APIC (Attached picture): ()[, 3]: image/jpg, 38227 bytes
COMM (Comments): (ID3v1 Comment)[XXX]: The highly anticipated debut
TRCK (Track number/Position in set): PUB
Que eu posso diminuir
$ id3v2 -R Drake\ -\ Over3.mp3 | grep POPM
POPM (Popularimeter): Windows Media Player 9 Series, counter=0 rating=196COMM (Comments): (MusicMatch_Preference)[eng]: Very Good
Problema:
Não sei como posso obter 'rating = ### `dessa string. Meu awk / sed-fu é fraco :(
command-line
awk
Roy Rico
fonte
fonte
grep POPM
mais o seugrep -o ...
.