From 1471acfd51a35e8e9a52c687fb9f8825afbcc152 Mon Sep 17 00:00:00 2001 From: rodri Date: Mon, 28 Dec 2020 19:40:06 +0000 Subject: keep track of time --- workout | 3 +++ 1 file changed, 3 insertions(+) diff --git a/workout b/workout index 8688035..78a2bee 100755 --- a/workout +++ b/workout @@ -7,6 +7,7 @@ reps=() sets=() wdir=$home/lib/fitness today=`{date | awk '{print $3 tolower($2) $6}'} +t0=`{date | awk '{split($4, hms, /:/); print hms[1]":"hms[2]}'} . <{<$wdir/exercises awk '/^[^ ]/ {print "exercises=($exercises ''"$0"'')"}'} @@ -81,10 +82,12 @@ fn setupreps{ } fn mkreport{ + t1=`{date | awk '{split($4, hms, /:/); print hms[1]":"hms[2]}'} echo '#'exercise,reps,sets >$wdir/$today for(i in `{seq 1 $#session}) if(! ~ $sets($i) 0) echo $exercises($session($i))^,^$reps($i)^,^$sets($i) >>$wdir/$today + echo '#' session ran from $t0 to $t1 >>$wdir/$today } fn start{ -- cgit v1.2.3