cmd

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DisplayCommand = &cli.Command{
	Name:  "display",
	Usage: "Display random or specific ANSI art",
	Flags: []cli.Flag{
		&cli.StringFlag{
			Name:    "file",
			Aliases: []string{"f"},
			Usage:   "Display a specific ANSI file instead of random",
		},
	},
	Action: runDisplay,
}
View Source
var DownloadCommand = &cli.Command{
	Name:      "download",
	Usage:     "Download art packs from 16colo.rs",
	ArgsUsage: "<year>",
	Flags: []cli.Flag{
		&cli.StringFlag{
			Name:    "group",
			Aliases: []string{"g"},
			Usage:   "Filter packs by group name",
		},
		&cli.StringFlag{
			Name:    "pack",
			Aliases: []string{"p"},
			Usage:   "Download a specific pack by name",
		},
	},
	Action: runDownload,
}
View Source
var LastCommand = &cli.Command{
	Name:  "last",
	Usage: "Print the path of the last displayed ANSI art file",
	Action: func(_ context.Context, _ *cli.Command) error {
		data, err := os.ReadFile(config.LastFile())
		if err != nil {
			return fmt.Errorf("no last file recorded (have you run ansimotd display?)")
		}
		fmt.Println(strings.TrimSpace(string(data)))
		return nil
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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