cmd

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2025 License: GPL-2.0 Imports: 34 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ArgOutput          = "output"
	ArgOutputShorthand = "o"

	ArgFormat          = "format"
	ArgFormatShorthand = "f"

	ArgPretty          = "pretty"
	ArgPrettyShorthand = "p"

	ArgSingleFile          = "single-file"
	ArgSingleFileShorthand = "s"

	FormatJSON = "json"
	FormatYAML = "yaml"

	TitleProperty = "title"
)
View Source
const (
	ArgsVerbose          = "verbose"
	ArgsVerboseShorthand = "v"
)
View Source
const (
	ArgSourceType     = "source-type"
	ArgLiveMode       = "live"
	ArgServerURL      = "server"
	ArgToken          = "token"
	ArgHiddenProperty = "hidden-property"
	ArgHiddenValue    = "hidden-value"
	ArgParseWikilinks = "parse-wikilinks"
)
View Source
const (
	ArgVersionFormat          = "format"
	ArgVersionFormatShorthand = "f"
)
View Source
const (
	DocsCommandsFolder = "./docs/commands"
)

Variables

View Source
var (
	ErrArgumentInvalid = errors.New("argument is invalid")
	ErrInvalidFormat   = errors.New("invalid format")
)

Functions

func DocFilePrepender

func DocFilePrepender(filename string) string

func Execute

func Execute()

func WriteItems

func WriteItems(items []*api.Item, opts WriteItemsOption) error

Types

type ConvertCommand

type ConvertCommand struct {
	*cobra.Command
	// contains filtered or unexported fields
}

func NewConvertCommand

func NewConvertCommand() *ConvertCommand

func (*ConvertCommand) Execute

func (c *ConvertCommand) Execute(_ *cobra.Command, args []string) error

type DocsCommand

type DocsCommand struct {
	Command *cobra.Command
	// contains filtered or unexported fields
}

func NewDocsCommand

func NewDocsCommand() *DocsCommand

NewDocsCommand creates a new cobra.Command for `docs` which generates documentation for the application.

func (*DocsCommand) Execute

func (c *DocsCommand) Execute(_ *cobra.Command, _ []string) error

type MigrateCommand

type MigrateCommand struct {
	Command *cobra.Command
	// contains filtered or unexported fields
}

func NewMigrateCommand

func NewMigrateCommand() *MigrateCommand

func (*MigrateCommand) Execute

func (mc *MigrateCommand) Execute(_ *cobra.Command, _ []string) error

type SyncCommand

type SyncCommand struct {
	*cobra.Command
	// contains filtered or unexported fields
}

func NewSyncCommand

func NewSyncCommand() *SyncCommand

NewSyncCommand returns a new sync command.

func (*SyncCommand) RunE

func (c *SyncCommand) RunE(cmd *cobra.Command, args []string) error

type SyncCommandOptions

type SyncCommandOptions struct {
	LiveMode       bool
	ServerURL      string
	Token          string
	HiddenProperty string
	HiddenValue    bool
	ParseWikilinks bool
}

type VersionCommand

type VersionCommand struct {
	Command *cobra.Command
}

func NewVersionCommand

func NewVersionCommand() *VersionCommand

type WriteItemsOption

type WriteItemsOption struct {
	Output     string // Output specifies the output directory or file path.
	Format     string // Format specifies the format of the output (e.g., JSON, XML).
	Pretty     bool   // Pretty specifies whether to format the output in a human-readable way.
	SingleFile bool   // SingleFile specifies whether to write all items into a single file.
}

WriteItemsOption represents the options for writing items.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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