config

package
v0.14.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultJiraStatusMap

func DefaultJiraStatusMap() map[string]string

DefaultJiraStatusMap returns the default status mapping when none is configured.

Types

type ColorScheme

type ColorScheme struct {
	Theme              string `toml:"theme"`
	ProjectColor       string `toml:"project"`
	ActiveColor        string `toml:"active"`
	InProgressColor    string `toml:"inprogress"`
	CompletedColor     string `toml:"completed"`
	SomedayColor       string `toml:"someday"`
	TaskColor          string `toml:"description"`
	CompletedTaskColor string `toml:"completed-description"`
	TagColor           string `toml:"tag"`
	TagBgColor         string `toml:"tag-bg"`
	SpecialTagColor    string `toml:"special-tag"`
	SpecialTagBgColor  string `toml:"special-tag-bg"`
	DateColor          string `toml:"date"`
	DateBgColor        string `toml:"date-bg"`
	PastDateColor      string `toml:"past-date"`
	PastDateBgColor    string `toml:"past-bg"`
	TodayDateColor     string `toml:"today-date"`
	TodayDateBgColor   string `toml:"today-bg"`
	AssigneeColor      string `toml:"assignee"`
	AssigneeBgColor    string `toml:"assignee-bg"`
	CycleColor         string `toml:"cycle"`
	CycleBgColor       string `toml:"cycle-bg"`
	OverdueColor       string `toml:"overdue"`
	OverdueBgColor     string `toml:"overdue-bg"`
	DeadlineColor      string `toml:"deadline"`
	ClockActiveColor   string `toml:"clock-active"`
	AgendaHeaderColor  string `toml:"agenda-header"`
}

type Config

type Config struct {
	GeneralConfig GeneralConfig `toml:"general"`
	Directories   Directories   `toml:"directories"`
	Todo          Todo          `toml:"todo"`
	Goals         Goals         `toml:"goals"`
	Schedule      Schedule      `toml:"schedule"`
	Colors        ColorScheme   `toml:"colors"`
	Jira          Jira          `toml:"jira"`
}

func Load

func Load() (*Config, error)

func (*Config) GetInboxFilePath

func (c *Config) GetInboxFilePath() string

GetInboxFilePath returns the absolute path to the inbox file based on configuration

func (*Config) HasJira

func (c *Config) HasJira() bool

HasJira returns true if JIRA integration is configured.

func (*Config) JiraStatusToKeyword

func (c *Config) JiraStatusToKeyword(jiraStatus string, isDoneCategory bool) string

JiraStatusToKeyword maps a JIRA status name to a karya keyword using the configured status map. Falls back to TODO for non-done categories and DONE for done categories.

func (*Config) JiraSyncInterval

func (c *Config) JiraSyncInterval() time.Duration

JiraSyncInterval returns the configured sync interval duration, defaulting to 15m.

func (*Config) Validate

func (c *Config) Validate() error

type Directories

type Directories struct {
	Projects     string `toml:"projects"`     // Project root directory
	Zettelkasten string `toml:"zettelkasten"` // Zettelkasten directory
	Karya        string `toml:"karya"`        // Karya inbox directory
}

type GeneralConfig

type GeneralConfig struct {
	EDITOR  string `toml:"editor"`
	Verbose bool   `toml:"verbose"`
}

type Goals

type Goals struct {
	YearStart string `toml:"year-start"`
}

type Jira

type Jira struct {
	Connections     []JiraConnection  `toml:"connections"`
	SyncInterval    string            `toml:"sync_interval"`
	StatusMap       map[string]string `toml:"status_map"`
	ExcludeProjects []string          `toml:"exclude_projects"`
}

type JiraConnection

type JiraConnection struct {
	Name     string `toml:"name"`
	Endpoint string `toml:"endpoint"` // MCP server URL, e.g. "https://mcp.atlassian.com/v1/mcp"
}

type Schedule

type Schedule struct {
	WeekStart          string `toml:"week_start"`
	DefaultWarningDays int    `toml:"default_warning_days"`
	DefaultView        string `toml:"default_view"`
}

type Todo

type Todo struct {
	ShowCompleted bool     `toml:"show_completed"`
	Structured    bool     `toml:"structured"`
	Active        []string `toml:"active"`
	InProgress    []string `toml:"inprogress"`
	Completed     []string `toml:"completed"`
	Someday       []string `toml:"someday"`
	SpecialTags   []string `toml:"special-tags"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL