Documentation
¶
Overview ¶
Package streakboard renders GitHub-style contribution boards from arbitrary per-day activity data — habits, vocabulary reviews, anything countable.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GitHubDark = Palette{hex(0x161b22), hex(0x0e4429), hex(0x006d32), hex(0x26a641), hex(0x39d353)} GitHubLight = Palette{hex(0xebedf0), hex(0x9be9a8), hex(0x40c463), hex(0x30a14e), hex(0x216e39)} )
GitHub's contribution-graph greens.
View Source
var ( CatppuccinLatte = ramp(hex(0xccd0da), hex(0xeff1f5), hex(0x40a02b)) CatppuccinFrappe = ramp(hex(0x414559), hex(0x303446), hex(0xa6d189)) CatppuccinMacchiato = ramp(hex(0x363a4f), hex(0x24273a), hex(0xa6da95)) CatppuccinMocha = ramp(hex(0x313244), hex(0x1e1e2e), hex(0xa6e3a1)) )
Catppuccin flavors (https://catppuccin.com/palette): empty cells use the flavor's surface0, active levels blend from base toward its green.
Functions ¶
Types ¶
type Entry ¶
type Entry struct {
Date time.Time // only the calendar date (in Date's own location) is used
Count int
}
Entry records activity on one day. Multiple entries for the same calendar date are summed.
type Options ¶
type Options struct {
Palette Palette // colors for levels 0-4; zero value means GitHubDark
Scale int // multiplier over the native geometry; <1 means 2
From time.Time // first day shown; zero means 364 days before To
To time.Time // last day shown; zero means today
Max int // count drawn at full intensity; <1 means the highest count in range
}
Options control Render. The zero value shows the last 365 days ending today, GitHub dark theme, at 2x GitHub's native geometry (10px cells, 3px gaps, 2px corner radius).
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
streakboard
command
Command streakboard renders an activity board to a PNG file from "YYYY-MM-DD COUNT" lines on stdin.
|
Command streakboard renders an activity board to a PNG file from "YYYY-MM-DD COUNT" lines on stdin. |
|
streakboard-demo
command
Command streakboard-demo shows the streakboard Bubble Tea component with generated habit data.
|
Command streakboard-demo shows the streakboard Bubble Tea component with generated habit data. |
|
Package kitty encodes images as Kitty graphics protocol escape sequences with Unicode placeholders, so cell-based TUIs can treat an image as ordinary text.
|
Package kitty encodes images as Kitty graphics protocol escape sequences with Unicode placeholders, so cell-based TUIs can treat an image as ordinary text. |
|
Package tui provides a Bubble Tea component that shows a streakboard as a pixel image embedded in the layout, using the Kitty graphics protocol's Unicode placeholders (supported by Ghostty and kitty).
|
Package tui provides a Bubble Tea component that shows a streakboard as a pixel image embedded in the layout, using the Kitty graphics protocol's Unicode placeholders (supported by Ghostty and kitty). |
Click to show internal directories.
Click to hide internal directories.