Skip to content

Instantly share code, notes, and snippets.

@khafatech
Created April 13, 2009 03:05
Show Gist options
  • Save khafatech/94236 to your computer and use it in GitHub Desktop.
Save khafatech/94236 to your computer and use it in GitHub Desktop.
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