From 66ef25c8aae63683bae38ce6291aa7bb83490097 Mon Sep 17 00:00:00 2001 From: Dustin Carlino Date: Tue, 15 Jan 2019 09:41:45 -0800 Subject: [PATCH] tool to compare screencaps --- editor/compare_screencaps.py | 14 ++++++++++++++ editor/compare_screencaps.sh | 17 +++++++++++++++++ editor/extract_colorscheme.py | 1 - 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100755 editor/compare_screencaps.py create mode 100755 editor/compare_screencaps.sh diff --git a/editor/compare_screencaps.py b/editor/compare_screencaps.py new file mode 100755 index 0000000000..dea75979bf --- /dev/null +++ b/editor/compare_screencaps.py @@ -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() diff --git a/editor/compare_screencaps.sh b/editor/compare_screencaps.sh new file mode 100755 index 0000000000..a07a4ea99d --- /dev/null +++ b/editor/compare_screencaps.sh @@ -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 diff --git a/editor/extract_colorscheme.py b/editor/extract_colorscheme.py index 6475c99beb..5428b84d03 100755 --- a/editor/extract_colorscheme.py +++ b/editor/extract_colorscheme.py @@ -1,7 +1,6 @@ #!/usr/bin/python2 import os -import subprocess import sys def run():