Skip to content

Commit

Permalink
gui: prepare to handle non-muccc recordings
Browse files Browse the repository at this point in the history
  • Loading branch information
Sec42 committed Mar 31, 2024
1 parent 8562d06 commit e0ba1e6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion gui/tools/2graphite
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,21 @@ for a in "$@" ; do
base=${a##*/}
base=${base#stats.}
base=${base#frames.}
dt=${base#muccc-}
case "$base" in
muccc-*) dt=${base#muccc-};pfx="iridium";;
hc610-*|patch-*) dt=${base#*-};dt=${dt%-*};pfx=miaoski.${base##*-};;
*) echo "UNKNOWN STATS: $base" >&2; continue ;;
esac
dt=${dt%_*}
ds=$(date -d "$dt 22:00" +%s)
if [ -z "$ds" ] ; then
echo "$dt not parseable" >&2
exit 1
fi
if [ "$pfx" != "iridium" ] ; then
echo -n "ignoring $pfx for now... - " >&2
exit 1
fi
cat ${out}/frames*.$base| while read val typ ; do
case "$typ" in
*) echo iridium.frames.$typ $val $ds;;
Expand Down

0 comments on commit e0ba1e6

Please sign in to comment.