Module visualize

Module visualize 

Source

Functions§

collect_commit_timestamps
Collect commit timestamps (unix epoch seconds) in reverse chronological order. Uses clean git invocation with –no-pager and no merges.
compute_calendar_heatmap
Compute a GitHub-style calendar heatmap (weekday x week-column). Returns grid[7][weeks] as Vec<Vec> with rows=Sun..Sat, cols=old->new (weeks).
compute_heatmap_utc
Compute a 7x24 (weekday x hour) heatmap in UTC (kept for internal/tests). Weekday index: 0=Sun,1=Mon,…,6=Sat
compute_timeline_weeks
Bucket commit timestamps into week bins (7-day windows) ending at now. Returns weeks bins, oldest -> newest (counts.len() == weeks).
render_calendar_heatmap_ascii
Render GitHub-style calendar heatmap (ASCII ramp)
render_calendar_heatmap_colored
Render GitHub-style calendar heatmap (colored)
render_heatmap_ascii
Render a 7x24 heatmap using an ASCII ramp. 0=Sun … 6=Sat as rows. Header shows hours 00..23; each cell is a character denoting relative intensity.
render_heatmap_ascii_colored
Render heatmap with optional color using ‘█’ blocks (space for zero).
render_timeline_bars
Render a compact single-line timeline using an ASCII ramp per bin. Uses a small 10-char ramp to visualize relative intensity within the provided counts.
render_timeline_bars_colored
Render timeline as Unicode bars with optional color. Uses unicode ramp “ ▁▂▃▄▅▆▇█“ (9 levels) + color ramp.
render_timeline_multiline
Render timeline as multi-row bars with optional color. height must be >= 1. Uses ‘█’ for color mode and ‘#’ for ASCII.
run_heatmap
Run the heatmap visualization end-to-end.
run_heatmap_with_options
Run the heatmap visualization with options.
run_timeline
Run the timeline visualization end-to-end with default weeks if needed.
run_timeline_with_options
Run the timeline visualization with options.