config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Digest contains configuration for the generated digest
	Digest struct {
		// Title is the title of the generated digest
		Title string `toml:"title"`

		// Format specifies the output format (markdown or epub)
		Format string `toml:"format"`

		// OutputPath is where the digest will be saved
		OutputPath string `toml:"output_path"`
	} `toml:"digest"`

	// Sources is a map of source configurations
	Sources map[string]source.SourceConfig `toml:"sources"`

	// ProcessorConfig contains configuration for the processors that will be
	// applied to all sources unless overridden in the source config
	ProcessorConfig processor.ProcessorConfig `toml:"global_processors"`

	// FetcherConfig contains configuration for the fetcher that will be used
	// to retrieve articles from sources unless overridden in the source config
	FetcherConfig fetcher.FetcherConfig `toml:"global_fetcher"`

	// Formatting contains formatting options
	Formatting map[string]any `toml:"formatting"`
}

Config represents the application configuration.

func Load

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

Load parses configuration from a TOML string.

func LoadFile

func LoadFile(path string) (*Config, error)

LoadFile loads configuration from a TOML file.

Jump to

Keyboard shortcuts

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