subcmd

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultEditor = "vi"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AppendCmd added in v0.8.0

type AppendCmd struct {
	Path   string `arg:"" help:"Post name or Post URL('https://<TEAM>.esa.io/posts/<NUM>' or '//<NUM>')."`
	Body   string `short:"b" required:"" help:"Post body file to append." predictor:"file"`
	Prefix string `help:"Prefix text."`
	Notice bool   `negatable:"" default:"true" help:"Post with notify."`
}

func (*AppendCmd) Run added in v0.8.0

func (cmd *AppendCmd) Run(ctx *kasa.Context) error

type CatCmd

type CatCmd struct {
	Path string `arg:"" help:"Post name or Post URL('https://<TEAM>.esa.io/posts/<NUM>' or '//<NUM>')."`
}

func (*CatCmd) Run

func (cmd *CatCmd) Run(ctx *kasa.Context) error

type CommentCmd added in v0.8.0

type CommentCmd struct {
	Path string `arg:"" help:"Post name or Post URL('https://<TEAM>.esa.io/posts/<NUM>' or '//<NUM>')."`
	Body string `short:"b" required:"" help:"Comment body file." predictor:"file"`
}

func (*CommentCmd) Run added in v0.8.0

func (cmd *CommentCmd) Run(ctx *kasa.Context) error

type CpCmd added in v0.3.0

type CpCmd struct {
	Source    string `arg:"" help:"Source post name/category/tag."`
	Target    string `arg:"" help:"Target post/category."`
	Force     bool   `short:"f" default:"false" help:"Skip confirmation of files to move."`
	Notice    bool   `negatable:"" help:"Copy with notify."`
	Page      int    `short:"p" default:"1" help:"Page number."`
	Recursive bool   `short:"r" default:"true" negatable:"" help:"Recursively list posts."`
}

func (*CpCmd) Run added in v0.3.0

func (cmd *CpCmd) Run(ctx *kasa.Context) error

type EditCmd added in v0.9.0

type EditCmd struct {
	Path   string `arg:"" help:"Post name or Post URL('https://<TEAM>.esa.io/posts/<NUM>' or '//<NUM>')."`
	Editor string `required:"" env:"EDITOR" help:"Editor to edit a post"`
	Notice bool   `negatable:"" default:"true" help:"Post with notify."`
}

func (*EditCmd) Run added in v0.9.0

func (cmd *EditCmd) Run(ctx *kasa.Context) error

type ImportCmd added in v1.5.0

type ImportCmd struct {
	Src    string `arg:"" help:"Source file or directory (stdin:'-')."`
	Path   string `arg:"" help:"Post name or Post URL('https://<TEAM>.esa.io/posts/<NUM>' or '//<NUM>')."`
	Notice bool   `negatable:"" default:"true" help:"Post with notify."`
	Wip    bool   `negatable:"" help:"Post as WIP."`
}

func (*ImportCmd) Run added in v1.5.0

func (cmd *ImportCmd) Run(ctx *kasa.Context) error

type InfoCmd added in v0.1.3

type InfoCmd struct {
	Path string `arg:"" help:"Post name or Post URL('https://<TEAM>.esa.io/posts/<NUM>' or '//<NUM>')."`
}

func (*InfoCmd) Run added in v0.1.3

func (cmd *InfoCmd) Run(ctx *kasa.Context) error

type LsCmd

type LsCmd struct {
	Path      string `arg:"" optional:"" help:"Post name/category/tag."`
	Json      bool   `help:"Output as JSON"`
	Page      int    `short:"p" default:"1" help:"Page number."`
	Recursive bool   `short:"r" default:"true" negatable:"" help:"Recursively list posts."`
}

func (*LsCmd) Run

func (cmd *LsCmd) Run(ctx *kasa.Context) error

type MvCmd

type MvCmd struct {
	Source    string `arg:"" help:"Source post name/category/tag."`
	Target    string `arg:"" help:"Target post/category."`
	Search    bool   `short:"s" help:"Search posts. see https://docs.esa.io/posts/104"`
	Force     bool   `short:"f" help:"Skip confirmation of files to move."`
	Notice    bool   `negatable:"" help:"Move with notify."`
	Page      int    `short:"p" default:"1" help:"Page number."`
	Recursive bool   `short:"r" default:"true" negatable:"" help:"Recursively list posts."`
}

func (*MvCmd) Run

func (cmd *MvCmd) Run(ctx *kasa.Context) error

type MvcatCmd

type MvcatCmd struct {
	From string `arg:"" help:"From category."`
	To   string `arg:"" help:"To category."`
}

func (*MvcatCmd) Run

func (cmd *MvcatCmd) Run(ctx *kasa.Context) error

type OpenCmd added in v0.6.5

type OpenCmd struct {
	Path string `arg:"" help:"Post name or Post URL('https://<TEAM>.esa.io/posts/<NUM>' or '//<NUM>')."`
}

func (*OpenCmd) Run added in v0.6.5

func (cmd *OpenCmd) Run(ctx *kasa.Context) error

type PostCmd

type PostCmd struct {
	Name     string   `short:"n" help:"Post title."`
	Body     string   `short:"b" help:"Post body file." predictor:"file"`
	Path     string   `arg:"" optional:"" help:"Post number to update."`
	Tags     []string `short:"t" help:"Post tags."`
	Category string   `short:"c" help:"Post category."`
	Wip      bool     `negatable:"" help:"Post as WIP."`
	Message  string   `short:"m" help:"Post message."`
	Notice   bool     `negatable:"" help:"Post with notify."`
}

func (*PostCmd) Run

func (cmd *PostCmd) Run(ctx *kasa.Context) error

type RmCmd

type RmCmd struct {
	Path      string `arg:"" help:"Source post name/category/tag."`
	Search    bool   `short:"s" help:"Search posts. see https://docs.esa.io/posts/104"`
	Force     bool   `short:"f" help:"Skip confirmation of files to delete."`
	Page      int    `short:"p" default:"1" help:"Page number."`
	Recursive bool   `short:"r" default:"true" negatable:"" help:"Recursively list posts."`
}

func (*RmCmd) Run

func (cmd *RmCmd) Run(ctx *kasa.Context) error

type RmiCmd added in v0.4.0

type RmiCmd struct {
	Path  string `arg:"" help:"Post name or Post URL('https://<TEAM>.esa.io/posts/<NUM>' or '//<NUM>')."`
	Force bool   `short:"f" help:"Skip confirmation of files to delete."`
}

func (*RmiCmd) Run added in v0.4.0

func (cmd *RmiCmd) Run(ctx *kasa.Context) error

type SearchCmd

type SearchCmd struct {
	Query string `arg:"" help:"Search query. see https://docs.esa.io/posts/104"`
	Json  bool   `help:"Output as JSON"`
	Page  int    `short:"p" default:"1" help:"Page number."`
}

func (*SearchCmd) Run

func (cmd *SearchCmd) Run(ctx *kasa.Context) error

type StatsCmd added in v0.9.10

type StatsCmd struct {
}

func (*StatsCmd) Run added in v0.9.10

func (cmd *StatsCmd) Run(ctx *kasa.Context) error

type TagCmd added in v0.4.2

type TagCmd struct {
	Path      string   `arg:"" help:"Post name/Post category/Post tag."`
	Tags      []string `short:"t" help:"Post tags."`
	Override  bool     `short:"o" help:"Override tags."`
	Delete    bool     `short:"d" help:"Delete tags."`
	Search    bool     `short:"s" help:"Search posts. see https://docs.esa.io/posts/104"`
	Force     bool     `short:"f" help:"Skip confirmation of files to move."`
	Notice    bool     `negatable:"" help:"Tagging with notify."`
	Page      int      `short:"p" default:"1" help:"Page number."`
	Recursive bool     `short:"r" default:"true" negatable:"" help:"Recursively list posts."`
}

func (*TagCmd) Run added in v0.4.2

func (cmd *TagCmd) Run(ctx *kasa.Context) error

type TagsCmd added in v0.9.9

type TagsCmd struct {
	Page int `short:"p" default:"1" help:"Page number."`
}

func (*TagsCmd) Run added in v0.9.9

func (cmd *TagsCmd) Run(ctx *kasa.Context) error

type TouchCmd added in v0.9.11

type TouchCmd struct {
	Path   string `arg:"" help:"Post name."`
	Notice bool   `negatable:"" help:"Post with notify."`
}

func (*TouchCmd) Run added in v0.9.11

func (cmd *TouchCmd) Run(ctx *kasa.Context) error

type UnwipCmd added in v1.5.0

type UnwipCmd struct {
	Path      string `arg:"" help:"Post name/Post category/Post tag."`
	Search    bool   `short:"s" help:"Search posts. see https://docs.esa.io/posts/104"`
	Force     bool   `short:"f" help:"Skip confirmation of files to move."`
	Notice    bool   `negatable:"" help:"Unwip with notify."`
	Page      int    `short:"p" default:"1" help:"Page number."`
	Recursive bool   `short:"r" default:"true" negatable:"" help:"Recursively list posts."`
}

func (*UnwipCmd) Run added in v1.5.0

func (cmd *UnwipCmd) Run(ctx *kasa.Context) error

type WipCmd added in v1.5.0

type WipCmd struct {
	Path      string `arg:"" help:"Post name/Post category/Post tag."`
	Search    bool   `short:"s" help:"Search posts. see https://docs.esa.io/posts/104"`
	Force     bool   `short:"f" help:"Skip confirmation of files to move."`
	Notice    bool   `negatable:"" help:"Unwip with notify."`
	Page      int    `short:"p" default:"1" help:"Page number."`
	Recursive bool   `short:"r" default:"true" negatable:"" help:"Recursively list posts."`
}

func (*WipCmd) Run added in v1.5.0

func (cmd *WipCmd) Run(ctx *kasa.Context) error

Jump to

Keyboard shortcuts

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