commit 6c1dd3666ca1ee6bb6a6c4869fc7164a7fa07a79
parent 10d41f8d612617e400c616c7c460bd921f2c1216
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date: Sat, 8 Jun 2024 13:45:57 +0200
fix: use unique names for activity dots
Diffstat:
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/activity.sh b/activity.sh
@@ -15,14 +15,15 @@ DIRS="$@"
# HTML output
function html_output {
- TTL=""
DTE="$1"
CMT="$2"
OPC="$3"
- if [[ ! -z $DTE ]]; then TTL+="$DTE"; fi
+ if [[ ! -z $DTE ]]; then
+ TTL+=$(date --date "${CUR_TIME}-01" "+%b, %Y");
+ fi
if [[ ! -z $CMT ]]; then TTL+=": $CMT commits"; fi
if [[ $OPC -lt 10 ]]; then OPC=10; fi
- ID="activity-$OPC"
+ ID="activity-$DTE"
CL="activitypoint"
STL="opacity:calc($OPC/100);"
ARGS="id=\"$ID\" class=\"activitypoint\" style=\"$STL\" title=\"$TTL\""
@@ -79,8 +80,7 @@ while [ $CUR_TIME != $MAX_TIME ]; do
# DATA+="$CUR_TIME ${CUR_VAL:-0} ${NRM_VAL:-5}\n"
# output HTML
- CUR_TIME_PRETTY=$(date --date "${CUR_TIME}-01" "+%b, %Y")
- HTML+=$(html_output "$CUR_TIME_PRETTY" ${CUR_VAL:-0} ${NRM_VAL:-0})
+ HTML+=$(html_output "$CUR_TIME" ${CUR_VAL:-0} ${NRM_VAL:-0})
# update current time
CUR_TIME=$(date --date "${CUR_TIME}-01 +1 month" +%Y-%m)