Martchus / tageditor

A tag editor with Qt GUI and command-line interface supporting MP4/M4A/AAC (iTunes), ID3, Vorbis, Opus, FLAC and Matroska
GNU General Public License v2.0
692 stars 56 forks source link

[Feature] Tag a file by finding a keyword in tageditor-cli #94

Closed GUUser91 closed 1 year ago

GUUser91 commented 1 year ago

I want tageditor-cli to find a file by typing one of it's filename and then be able to tag it in one command

For example, kid3-cli has a feature where you can look for instance, a file called Jingo (Todd Terry Classic 12 Remix) by typing one or more keywords and then be able to tag it in one command kid3-cli -c "set artist 'Candido'" -c "set title 'Jingo (Todd Terry Classic 12/" Remix)'" -c "set album 'Salsoul Records: The Original Disco Mixes, Vol. 1'" '*Todd Terry Classic 12*'

Martchus commented 1 year ago

Seems like a valid feature request, though I have never needed this so far myself. Maye I'll implement it at some point.

I suppose in your example it would search recursively within the current working directory? And I suppose it would simply search all tag fields matching the specified glob?

GUUser91 commented 1 year ago

I suppose in your example it would search recursively within the current working directory?

Correct

And I suppose it would simply search all tag fields matching the specified glob?

I meant it would search keywords of the filename itself. For example for this command I would tag a file called "66 Book of Revelation | Read by Alexander Scourby the Voice of the KJV Bible | SHARE it with OTHERS. [IA_v7OGaikY].m4a" by searching characters included in the filename, IA_v7OGaikY

kid3-cli -c "set artist 'Alexander Scourby'" -c "set title '66 Book of Revelation | Read by Alexander Scourby the Voice of the KJV Bible | SHARE it with OTHERS." '*IA_v7OGaikY*'

Martchus commented 1 year ago

What prevents you from simply using find (which is also available on Windows via e.g. MSYS2):

find -name  '*IA_v7OGaikY*' -exec tageditor set artist='Alexander Scourby' title='66 Book of Revelation | Read by Alexander Scourby the Voice of the KJV Bible | SHARE it with OTHERS.' -f {} \+

I haven't tested that command so maybe you'll have to tweak it. I would actually avoid implementing such functionality when one can simply use find.