Simple ID3 tagger


/ Published in: Python
Save to your folder(s)

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


Copy this code and paste it in your HTML
  1. import os, sys
  2. from ID3 import *
  3.  
  4. files = os.listdir(os.getcwd())
  5.  
  6. for f in files:
  7. x = os.path.splitext(f)
  8. if x[1] == '.mp3':
  9. n = x[0].split(' - ')
  10. author = n[0]
  11. title = n[1]
  12. id3info = ID3(f)
  13. id3info['ARTIST'] = author
  14. id3info['TITLE'] = title
  15. print f+' id3 tagged.'
  16. print 'Done!'

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.