aboutsummaryrefslogtreecommitdiff
path: root/workout
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2020-12-28 19:40:06 +0000
committerrodri <rgl@antares-labs.eu>2020-12-28 19:40:06 +0000
commit1471acfd51a35e8e9a52c687fb9f8825afbcc152 (patch)
tree9350a09556764f9d5880b7afa4d04f0c5f51dddb /workout
parentf099db359996588c70fb3f8fe5f413c5d604394f (diff)
downloadrcfitness-1471acfd51a35e8e9a52c687fb9f8825afbcc152.tar.gz
rcfitness-1471acfd51a35e8e9a52c687fb9f8825afbcc152.tar.bz2
rcfitness-1471acfd51a35e8e9a52c687fb9f8825afbcc152.zip
keep track of time
Diffstat (limited to 'workout')
-rwxr-xr-xworkout3
1 files changed, 3 insertions, 0 deletions
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{