cmd

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GreenBg  = string([]byte{27, 91, 57, 55, 59, 52, 50, 109})
	RedBg    = string([]byte{27, 91, 57, 55, 59, 52, 49, 109})
	Red      = string([]byte{27, 91, 57, 49, 109})
	Cyan     = string([]byte{27, 91, 51, 54, 109})
	YellowBg = string([]byte{27, 91, 57, 48, 59, 52, 51, 109})
	Yellow   = string([]byte{27, 91, 51, 51, 109})
	Cls      = "\033[2J\033[H"
	Reset    = string([]byte{27, 91, 48, 109})
	// >
	Cursor = "\033[?25h>"
)

Functions

func ParseArgs

func ParseArgs(s string) []string

func ParseFlagArgs

func ParseFlagArgs(flag []string) (f []string)

func TestingString

func TestingString() (text string)

just for test

Types

type Add_

type Add_ struct {
	MustContain    string `json:"mustContain"`
	MustNotContain string `json:"mustNotContain"`
	UseRegexp      bool   `json:"useRegexp"`
	Group          string `json:"group"`
	Feed           string `json:"feed"`
	FeedName       string `json:"feedName"`
	Index          string `json:"index"`
}

type Cmd

type Cmd struct {
	Cmd string          `json:"cmd"`
	Arg string          `json:"arg"`
	Raw json.RawMessage `json:"raw"`
}

type Command

type Command struct {
	N    string
	Opt  Option
	Flag struct {
		Using          bool
		SubtitleGroup  string `short:"g" long:"group" required:"false"`
		MustContain    string `long:"mc"   required:"false"`
		MustNotContain string `long:"mn"   required:"false"`
		UseRegex       bool   `long:"rg"   required:"false"`
		Index          int    `short:"i" long:"index" required:"false"`
		Name           string `short:"n" long:"name" required:"false"`
	}
	Err error
}

func Parse

func Parse(cmds []string) (reply Command)

type Lsi_

type Lsi_ struct {
	SearchList bool `json:"searchList"`
}

type Option

type Option int
const (
	Add Option = iota
	Del
	Ls
	LsItems
	LsItems_searchlist //lsi -s
	LsGroup            // reserved command
	Help
	Status
	Stop
	AddFeed
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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