This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Generate calendar.csv as input data for heatmap | |
| curl -s https://curl.se/docs/releases.csv |\ | |
| awk -F';' '{print $4}' |\ | |
| while read -r d; do | |
| wday=$(date -d "$d" +%u) # 1=Mon..7=Sun | |
| week=$(date -d "$d" +%V) # ISO week 01..53 | |
| printf "%s,%s,%s\n" "$d" "$week" "$wday" | |
| done |\ | |
| awk -F',' '{ key=$2","$3; c[key]++ } | |
| END {for (k in c) print k","c[k]}' |\ |