| cmd | ||
| .gitignore | ||
| go.mod | ||
| go.sum | ||
| lagrange-2023-06-17.png | ||
| LICENSE | ||
| main.go | ||
| README.md | ||
date-heatmap
Generates a Github-like heatmap graphic from a list of tab-separated numbers and dates.
Writes a PNG to stdout.
Example:
Running the following command in the Lagrange Gemini browser's repository...
git shortlog --group='%cd' --date='format:%Y-%m-%d' -s | date-heatmap --origin-dow sunday --cols 52 --labels --until 2023-06-17 > 2023-06-17-lagrange.png
...produces this image summarizing the commit frequency of the past 52 weeks as of 2023-06-17:
Usage:
date-heatmap [flags]
Flags:
--cols int how many columns of squares. (automatically calculated from days and rows if omitted.)
--days int number of days to render (must be <= rows*cols) (automatically calculated from columns and rows if omitted.)
-h, --help help for date-heatmap
--labels whether to draw day of week and month labels
--origin-dow string day of week with which to align the graph's origin. (optional)
--padding int padding between the squares (default 3)
--palette string list of threshold values and their associated colors, with special "bg", "fg", and "df" thresholds for the background, font, and default square colors, respectively. colors must be specified as 6 or 8 digit RGB or RGBA hexadecimal strings. (default "bg:000000;fg:FFFFFF;df:161B22;2:0E4429;4:006D32;6:26A641;8:39D353")
--rows int how many rows of squares (default 7)
--size int pixel size of the squares (default 10)
--until string end date for the heat map. defaults to the current date.
hex@reform:~/extramuros/src/lagrange$
TODO
- Custom font faces, sizes, and spacing
