Monday, September 2, 2013

Editing ID3 tags from command line using Python.

You can build a Python module from scratch just to edit ID3 tags, but there is no need to reinvent the wheel since there are many modules ready for this job.I have been using which is very straightforward , anyway, here is a little How-to
* Download the module and extract it to any directory you like
* Navigate to the directory where you extracted the module to
cd /ID3/id3-py-1.2
*Install the module
sudo python install
* If there is no errors , you are ready to go.
download this python script created by the same author ,
make it executable
chmod  a+x
 , you can copy the file to the home directory for an easier access
we are almost done,
here is an example on how to use the file
find ./ -d 1 -name '*.mp3' -exec ~/ -A 'soundcloud' {} \;

this command will search for any mp3 file in the directory [not recursively] , then will modify the Album tag to soundcloud , you can modify/add different tags to the command as you wish.