misc: add code review tool
|
@ -0,0 +1,6 @@
|
||||||
|
DirectoryIndex index.cgi
|
||||||
|
Options Indexes
|
||||||
|
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch Indexes +FollowSymLinks
|
||||||
|
Order allow,deny
|
||||||
|
Allow from all
|
||||||
|
AddHandler cgi-script .cgi
|
|
@ -0,0 +1 @@
|
||||||
|
Original image watermarked (c) 2008 Focus Shift
|
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 6.5 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 7.2 KiB |
After Width: | Height: | Size: 9.8 KiB |
After Width: | Height: | Size: 28 KiB |
|
@ -0,0 +1,17 @@
|
||||||
|
#! /usr/bin/env python
|
||||||
|
|
||||||
|
import cgi
|
||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
|
||||||
|
print 'Content-type: image/png\n'
|
||||||
|
|
||||||
|
cmd = ['convert', 'codereview-base.png']
|
||||||
|
qs = os.environ.get('QUERY_STRING', '')
|
||||||
|
for c in '1234567':
|
||||||
|
if c in qs:
|
||||||
|
cmd.extend(['codereview-%s.png' % c, '-composite'])
|
||||||
|
|
||||||
|
cmd.append('png:-')
|
||||||
|
sys.stdout.write(subprocess.check_output(cmd))
|