Created
April 13, 2009 03:05
-
-
Save khafatech/94236 to your computer and use it in GitHub Desktop.
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
import re | |
import os | |
import glob | |
fnames = glob.glob('*.flac') | |
# encode files | |
for f in fnames: | |
os.system('oggenc "%s" -a "%s" -l "%s" -t "%s" -o "%s.ogg"' % \ | |
(f, "The Orb", "Aubrey Mixes: The Ultraworld Excursions", \ | |
re.search(r'[0-9]{2} ([^]]*\])', f).group(1), \ | |
'.'.join(re.search(r'[0-9]{2} ([^\[]*)\s\[([^\]]*)\]', f).groups()).replace(' ', '-'))) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment