From ca41eddfdc979955105cce572e659941544d6f6d Mon Sep 17 00:00:00 2001 From: Patrick Simianer
Date: Thu, 9 Oct 2014 20:44:15 +0100 Subject: alles neu macht der mai --- gallery | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'gallery') diff --git a/gallery b/gallery index 2f89dfa..b92b467 100755 --- a/gallery +++ b/gallery @@ -12,28 +12,28 @@ Patrick Simianer
import sys, os, glob, subprocess, shlex def main(): - try: - path = sys.argv[1] - except IndexError: - print 'Usage: gallery.py /path/to/images/' - sys.exit(1) - path += '/' - files = glob.glob(path+'*.jpg') - if not os.path.exists(path+'thumbs'): - os.mkdir(path+'thumbs') - files.sort() - for f in files: - cmd = 'convert "'+f+'" -resize 320x320 "'+path+'thumbs/'+f.split('/')[-1]+'"' - a = shlex.split(cmd) - subprocess.Popen(a) + try: + path = sys.argv[1] + except IndexError: + print 'Usage: gallery.py /path/to/images/' + sys.exit(1) + path += '/' + files = glob.glob(path+'*.jpg') + if not os.path.exists(path+'thumbs'): + os.mkdir(path+'thumbs') + files.sort() + for f in files: + cmd = 'convert "'+f+'" -resize 320x320 "'+path+'thumbs/'+f.split('/')[-1]+'"' + a = shlex.split(cmd) + subprocess.Popen(a) - print '