Created
February 9, 2011 09:22
-
-
Save yunazuno/818194 to your computer and use it in GitHub Desktop.
Output filepath if the mp3 has no album artwork
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
""" | |
Output filepath if the mp3 has no album artwork. | |
Usage: | |
./get_no_artwork_file.py file [file..] | |
Example: | |
find . -name "*.mp3" -print0 | xargs -0 ./get_no_artwork_file.py | |
""" | |
import eyeD3 | |
import sys | |
def check_artwork(path): | |
tag = eyeD3.Tag() | |
tag.link(path) | |
if (len(tag.getImages()) == 0): | |
print path | |
def main(): | |
if (len(sys.argv) < 2): | |
sys.exit("Usage: ./get_no_artwork_file.py file [file...]") | |
for i in range(1, len(sys.argv)): | |
check_artwork(sys.argv[i]) | |
if __name__ == "__main__": | |
main() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment