cli

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run()

Types

type Command

type Command interface {
	Run(db lib.DB) error
}

type ListCommand

type ListCommand struct {
	Tags   lib.Tags `arg:"positional" help:"list only files with the tag in the format name[:value]" placeholder:"TAG"`
	Format string   `arg:"-f" help:"text | json" default:"text"`
}

func (ListCommand) Run

func (cmd ListCommand) Run(db lib.DB) error

type TagCommand

type TagCommand struct {
	Glob        string   `arg:"positional" help:"include files matching the glob [default: *]" default:"*"`
	ExcludeGlob string   `arg:"--exclude,-E" help:"exclude files matching the glob" placeholder:"GLOB"`
	Tags        lib.Tags `arg:"--tag,-t,separate" help:"tag in the format name[:value]" placeholder:"TAG"`
	AutoTags    bool     `arg:"--auto-tags,-A" help:"add tags derived from the file system"`
	DryRun      bool     `arg:"--dry-run,-D" help:"don't make any changes"`
	Verbose     bool     `arg:"-v" help:"show as much info as available"`
}

func (TagCommand) Run

func (cmd TagCommand) Run(db lib.DB) error

type UntagCommand

type UntagCommand struct {
	Glob        string   `arg:"positional" help:"include files matching the glob [default: **]" default:"**"`
	ExcludeGlob string   `arg:"--exclude,-E" help:"exclude files matching the glob" placeholder:"GLOB"`
	Tags        lib.Tags `arg:"--tag,-t,separate" help:"remove the tag in the format name[:value]" placeholder:"TAG"`
	AutoTags    bool     `arg:"--auto-tags,-A" help:"remove tags derived from the file system"`
	DryRun      bool     `arg:"--dry-run,-D" help:"don't make any changes"`
	Verbose     bool     `arg:"-v" help:"show as much info as available"`
}

func (UntagCommand) Run

func (cmd UntagCommand) Run(db lib.DB) error

Jump to

Keyboard shortcuts

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