cli

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2025 License: ISC Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitQuikiDir

func InitQuikiDir(c *Config)

InitQuikiDir sets up the quiki directory path

func RunInteractiveMode

func RunInteractiveMode(jsonOutput bool)

RunInteractiveMode reads from stdin and processes a page

func RunPageAndExit

func RunPageAndExit(page *wikifier.Page, jsonOutput bool)

RunPageAndExit processes a wikifier page and exits

Types

type Config

type Config struct {
	Interactive bool
	Wizard      bool
	WikiPath    string
	ForceGen    bool
	JSONOutput  bool
	Reload      bool
	QuikiDir    string
	// server options - only used in full mode
	Bind   string
	Port   string
	Host   string
	Config string
}

Config holds the cli configuration

func ParseFlags

func ParseFlags(parser Parser) (*Config, []string)

ParseFlags sets up flags and returns parsed config and remaining args

type Parser

type Parser interface {
	SetupFlags(c *Config)
	HandleCommand(c *Config, args []string) error
}

Parser interface for different cli modes

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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