Documentation
¶
Index ¶
- func Log(action string, steps []config.Step, afk bool, vars tmpl.Vars)
- func LogCooldown(profile, action string, cooldownSeconds int)
- func LogCooldownRecord(profile, action string, cooldownSeconds int)
- func LogPath() string
- func LogSilent(profile, action string)
- func LogSilentDisable()
- func LogSilentEnable(d time.Duration)
- type DayGroup
- type DaySummary
- type Entry
- type EntryKind
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Log ¶
Log appends to the log file a summary line followed by one detail line per step. Errors are printed to stderr but never returned — logging is best-effort.
func LogCooldown ¶ added in v0.2.3
LogCooldown appends a single line noting that an invocation was skipped due to cooldown. Best-effort, same as Log.
func LogCooldownRecord ¶ added in v0.2.3
LogCooldownRecord appends a single line noting that cooldown state was updated for an action. Best-effort, same as Log.
func LogPath ¶ added in v0.2.11
func LogPath() string
LogPath returns the log file location:
- Windows: %APPDATA%\notify\notify.log
- Unix: ~/.config/notify/notify.log
func LogSilent ¶ added in v0.2.7
func LogSilent(profile, action string)
LogSilent appends a single line noting that an invocation was skipped due to silent mode. Best-effort, same as Log.
func LogSilentDisable ¶ added in v0.2.7
func LogSilentDisable()
LogSilentDisable appends a single line noting that silent mode was disabled. Best-effort, same as Log.
func LogSilentEnable ¶ added in v0.2.7
LogSilentEnable appends a single line noting that silent mode was enabled. Best-effort, same as Log.
Types ¶
type DayGroup ¶ added in v0.2.11
type DayGroup struct {
Date time.Time
Summaries []DaySummary
}
DayGroup holds all summaries for a single calendar day.
func SummarizeByDay ¶ added in v0.2.11
SummarizeByDay filters entries to the last N calendar days (local time), groups by date + profile/action, and returns day groups sorted descending with summaries sorted alphabetically.
type DaySummary ¶ added in v0.2.11
DaySummary holds execution and skip counts for one profile/action pair.
type Entry ¶ added in v0.2.11
Entry is a single parsed log entry.
func ParseEntries ¶ added in v0.2.11
ParseEntries splits log content on blank lines and parses summary lines into entries. Each block may contain multiple summary lines (e.g. a cooldown=recorded line followed by an execution line) plus step detail lines (indented with "step["). Step detail lines are skipped. Each summary line produces one Entry. Malformed lines are silently skipped.