Skip to content

Instantly share code, notes, and snippets.

@buhii
Created January 16, 2013 17:46
Show Gist options
  • Save buhii/4549147 to your computer and use it in GitHub Desktop.
Save buhii/4549147 to your computer and use it in GitHub Desktop.
#!/Users/buhii/.virtualenvs/gemini/bin/python
# -*- coding: utf-8 -*-
import os
from path import path
IMAGE_EXTENSIONS = ('png', 'jpg', 'gif', 'pdf')
d = path('.')
for ext in IMAGE_EXTENSIONS:
for f in d.files('*.%s' % ext):
if not (f.stripext() + '.bb').isfile():
print "ebb %s" % f
os.system("ebb %s" % f)
if not (f.stripext() + '.xbb').isfile():
print "extractbb %s" % f
os.system("extractbb %s" % f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment