diff options
| author | spv <spv@spv.sh> | 2025-11-23 13:47:37 -0500 |
|---|---|---|
| committer | spv <spv@spv.sh> | 2025-11-23 13:48:49 -0500 |
| commit | aceb8340357347d68b5b96b778e3a928bcdd3c5e (patch) | |
| tree | 75cd345d7b5bfd8c09556a52183d4883cb9d6ba0 /src/sb | |
| parent | a191ad0247eac24c30d41de1d484d9d60e3acb2a (diff) | |
add `sb` for summation, fixup ROADMAP
Diffstat (limited to 'src/sb')
| -rwxr-xr-x | src/sb | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -0,0 +1,21 @@ +#!/usr/bin/env zsh + +STROKE_BUDDY_DIR=~/.local/stroke_buddy +TODAY=`date -I` + +function count_for_date { + lines=0 + + for hourly_file in $STROKE_BUDDY_DIR/"$1"*; do + hourly_presses=$(cat $hourly_file \ + | grep keypresses \ + | cut -d',' -f2) + + lines=$(($lines+$hourly_presses)) +# lines=$(($lines+$hourly)); + done + + echo $lines +} + +echo $(count_for_date $TODAY) |
