summaryrefslogtreecommitdiff
path: root/gallery
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2014-10-09 20:44:15 +0100
committerPatrick Simianer <p@simianer.de>2014-10-09 20:44:15 +0100
commitca41eddfdc979955105cce572e659941544d6f6d (patch)
treebf446902e8323e58c6fc14dce808b9719da7d3f6 /gallery
parent0aae427eb3838297f6e204c2961739ef834762cf (diff)
alles neu macht der mai
Diffstat (limited to 'gallery')
-rwxr-xr-xgallery42
1 files changed, 21 insertions, 21 deletions
diff --git a/gallery b/gallery
index 2f89dfa..b92b467 100755
--- a/gallery
+++ b/gallery
@@ -12,28 +12,28 @@ Patrick Simianer <p@simianer.de>
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 '<html><head><title></title></head><body style="background:#000">'
- print '<div style="text-align:center"><p style="font-size:0.8em;color:#303030">Anklicken zum Vergr&ouml;&szlig;ern</p>'
- for f in files:
- print '<div style="padding:16px;">'
- print '<a href="'+f+'" target="_blank"><img style="border:2px solid #303030" src="thumbs/'+f+'" /></a>'
- print '</div>'
- print '</div></body></html>'
+ print '<html><head><title></title></head><body style="background:#000">'
+ print '<div style="text-align:center"><p style="font-size:0.8em;color:#303030">Anklicken zum Vergr&ouml;&szlig;ern</p>'
+ for f in files:
+ print '<div style="padding:16px;">'
+ print '<a href="'+f+'" target="_blank"><img style="border:2px solid #303030" src="thumbs/'+f+'" /></a>'
+ print '</div>'
+ print '</div></body></html>'
if __name__ == '__main__':
main()