From 20d4edb620808730d5f31915ad0f8a00a8ec748e Mon Sep 17 00:00:00 2001 From: Stefan `Sec` Zehl Date: Sun, 31 Mar 2024 14:03:40 +0200 Subject: [PATCH] [gui] special madrid handling --- gui/tools/2graphite | 1 + gui/tools/iridium-do-parse | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gui/tools/2graphite b/gui/tools/2graphite index f95558b..5f0112c 100755 --- a/gui/tools/2graphite +++ b/gui/tools/2graphite @@ -19,6 +19,7 @@ for a in "$@" ; do base=${base#frames.} case "$base" in muccc-*) dt=${base#muccc-};pfx="iridium";; + madrid-*) dt=${base#madrid-};pfx="madrid";; hc610-*|patch-*) dt=${base#*-};dt=${dt%-*};pfx=miaoski.${base##*-};; *) echo "UNKNOWN STATS: $base" >&2; continue ;; esac diff --git a/gui/tools/iridium-do-parse b/gui/tools/iridium-do-parse index 0f0aa25..c6c3926 100755 --- a/gui/tools/iridium-do-parse +++ b/gui/tools/iridium-do-parse @@ -118,6 +118,11 @@ case "$input" in *) precmd=cat;; esac +case "$input" in + madrid*) fixcmd="sed 's/^[01]*//'";; + *) fixcmd=cat;; +esac + #if [ "$#" -gt 1 ] ; then # echo -n "Parsing $base (+more) ..." #else @@ -127,7 +132,7 @@ esac echo -n "Parsing $# ..." date > ${pf} -${precmd} $* |grep ^R|cleanup_bits_timeseq.pl 2>${sef}.clean| /usr/bin/time -p -o ${tf} pypy3 ~/iridium-toolkit/iridium-parser.py --errorfile "${ef}" ${extra} --errorstats > ${of} 2>${sef} +${precmd} $* |eval ${fixcmd}|grep ^R|cleanup_bits_timeseq.pl 2>${sef}.clean| /usr/bin/time -p -o ${tf} pypy3 ~/iridium-toolkit/iridium-parser.py --errorfile "${ef}" ${extra} --errorstats > ${of} 2>${sef} if [ "$?" -gt "0" ] ; then echo "" echo "ERROR: parser exited non-zero: $?"