config

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveHome

func ResolveHome() (string, error)

func Sync

func Sync(d *db.DB, cfg *Config) error

Sync upserts cfg.Feeds into the database. Feeds present in the DB but absent from cfg are intentionally NOT removed — manual deletion is the user's job until the Settings TUI ships.

Types

type Config

type Config struct {
	Feeds             []FeedEntry   `yaml:"feeds"`
	SmartFolders      []SmartFolder `yaml:"smart_folders,omitempty"`
	AfterSyncCommands []string      `yaml:"after_sync_commands,omitempty"`

	// RefreshInterval in minutes. 0 (default) disables the background
	// auto-refresh timer; use `R` or `:sync` for manual pulls.
	RefreshInterval int `yaml:"refresh_interval_minutes,omitempty"`
}

func Load

func Load(home string) (*Config, error)

Load reads <home>/config.yaml. A missing file yields an empty Config (not an error) so first-run users get a usable zero state.

type FeedEntry

type FeedEntry struct {
	Name     string `yaml:"name"`
	URL      string `yaml:"url"`
	Category string `yaml:"category,omitempty"`
}

type SmartFolder

type SmartFolder struct {
	Name  string `yaml:"name"`
	Query string `yaml:"query"`
}

SmartFolder is a saved query that appears as a virtual folder in the feed list. Selecting it loads articles from across all feeds filtered by Query (using the rdr query language, see internal/ui/query.go).

Jump to

Keyboard shortcuts

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