From 6a1872ccf4fd6cf4527411eb292629b8c930f63e Mon Sep 17 00:00:00 2001 From: reimannsum Date: Fri, 30 Oct 2015 12:05:15 -0400 Subject: [PATCH] Create process_output.sh script to format ans summarize each output in the cards directory --- scripts/crons/process_output.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 scripts/crons/process_output.sh diff --git a/scripts/crons/process_output.sh b/scripts/crons/process_output.sh new file mode 100644 index 0000000..631e28f --- /dev/null +++ b/scripts/crons/process_output.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# every 5 min + +## */30 * * * * ~/mtgencode/scripts/crons/process_output.sh + +cd ~/mtgencode/cards + +for folder in $(ls); do + for sub in ${ ls ${folder} };do + if [ ! -e $folder/$sub/summary.txt ]; then + ./scritps/summarize.py -a -v $folder/$sub/output.txt > summary.txt + fi + if [ ! -e $folder/$sub/cards.txt ]; then + .decode.py -v -f $folder/$sub/output.txt $folder/$sub/cards.txt + fi + done +done