Return to Snippet

Revision: 59788
at October 1, 2012 21:19 by zhyar


Initial Code
import os, sys
from ID3 import *

files = os.listdir(os.getcwd())

for f in files:
	x = os.path.splitext(f)
	if x[1] == '.mp3':
		n = x[0].split(' - ')
		author = n[0]
		title = n[1]
		id3info = ID3(f)
		id3info['ARTIST'] = author
		id3info['TITLE'] = title
		print f+' id3 tagged.'
print 'Done!'

Initial URL

                                

Initial Description
Require the ID3 lib.
Place the script in the directory containing the mp3 files.

Initial Title
Simple ID3 tagger

Initial Tags
python

Initial Language
Python