#!/bin/bash tarid=69 perl_script=a47.pl.txt rm *.xml 2> /dev/null rm -r scans 2> /dev/null mkdir scans 2>/dev/null if [ $? -ne 0 ] then echo "Cannot create folder \"scans\"" exit 1 fi tar -C scans --wildcards -x "*.png" -vzf asp*_*$tarid.tar.gz tar --wildcards -x "*.xml" -vzf asp*_*$tarid.tar.gz echo -ne "Cropping." for f in scans/???????????????????????.png do if [ -f $f ] then ref=`basename $f .png` convert -crop 460x220+475+28 $f scans/crop.$ref.png echo -ne "." fi done echo "Done" xml=`echo acc_200_f_*.xml` echo -e "\nChecking:" eval `./$perl_script xml=$xml` echo opening_date=$opening_date echo closing_date=$closing_date echo -e "\nSaving:" watch="(telekurs\s+multipay|ordre\s+debit\s+direct|online-shopping\s+deferred)" ./$perl_script xml=$xml save=$opening_date-$closing_date htm=out.htm watch=$watch exclude=no