Daily Strokes

A calendar heatmap of my daily steno strokes

2024-04-19

I know it's currently broken, but I can't be bothered to fix it.

I'm using the cal-heatmap library to generate these and the following script below to count the number of strokes per day from Plover's strokes.log file.


#!/bin/bash

cd ~/.config/plover

raw=($(cut -c-10 strokes.log))

dates=($(echo "${raw[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' '))

for i in "${dates[@]}"; do
    count=$(cat strokes.log | grep -c "$i")
    epochTime=$(date --date="${i}" +"%s")
    epochTime=$((epochTime+61200))
    string="\"$epochTime\": ${count},"
    echo "$string"
done

The following bash script will output the daily strokes in a more human-readable format:


#!/bin/bash

cd ~/.config/plover

raw=($(cut -c-10 strokes.log))

dates=($(echo "${raw[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' '))

for i in "${dates[@]}"; do
    count=$(cat strokes.log | grep -c "$i")
    string="${i} ${count}"
    echo "$string"
done


This is counting all of the strokes on the main computers I use Plover with (a Stenogotchi, a desktop PC, and my main laptop).


Back