Skip to content

Instantly share code, notes, and snippets.

@md1023
Last active August 29, 2015 14:21
Show Gist options
  • Save md1023/07bf843225d7b1502caa to your computer and use it in GitHub Desktop.
Save md1023/07bf843225d7b1502caa to your computer and use it in GitHub Desktop.
Print song filename, title and artist with Python and EyeD3
import os
import eyed3
mp3s = []
for path, subdirs, files in os.walk("."):
mp3s.extend(
[os.path.join(path, name) for name in files if name[-4:] == ".mp3"])
for name in mp3s:
f = eyed3.load(name)
print name, getattr(f.tag, "title", ""), getattr(f.tag, "artist", "")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment