tool to compare screencaps

This commit is contained in:
Dustin Carlino 2019-01-15 09:41:45 -08:00
parent 09a3aed407
commit 66ef25c8aa
3 changed files with 31 additions and 1 deletions

14
editor/compare_screencaps.py Executable file
View File

@ -0,0 +1,14 @@
#!/usr/bin/python2
import os
import subprocess
import sys
def run():
print sorted(os.listdir(sys.argv[1]))
print sorted(os.listdir(sys.argv[2]))
if __name__ == '__main__':
run()

17
editor/compare_screencaps.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
before=$1;
after=$2;
rm -rf diff
mkdir diff
for file in `ls $before | grep -v full.png`; do
diff $before/$file $after/$file;
if [ $? -eq 1 ]; then
compare $before/$file $after/$file diff/$file;
if [ "$3" == "-i" ]; then
ristretto diff/$file $before/$file $after/$file;
fi
fi
done

View File

@ -1,7 +1,6 @@
#!/usr/bin/python2
import os
import subprocess
import sys
def run():