types

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Args

type Args struct {
	Install    *InstallCmd   `arg:"subcommand:install" help:"install fonts"`
	Uninstall  *UninstallCmd `arg:"subcommand:uninstall" help:"uninstall fonts"`
	List       *ListCmd      `arg:"subcommand:list" help:"list fonts"`
	Update     *UpdateCmd    `arg:"subcommand:update" help:"update installed fonts"`
	KeepTars   bool          `arg:"-k" help:"Keep archives in the download location"`
	ForceCheck bool          `arg:"-f" help:"Force checking for updates"`
}

func (Args) Version

func (Args) Version() string

type Font

type Font struct {
	Id                 int    `json:"id"`
	Name               string `json:"name"`
	ContentType        string `json:"content_type"`
	BrowserDownloadUrl string `json:"browser_download_url"`
	AvailableVersion   string
	InstalledVersion   string
}

func (*Font) AddAvailableVersion

func (f *Font) AddAvailableVersion(ver string)

func (*Font) AddInstalledVersion

func (f *Font) AddInstalledVersion(ver string)

type GuiParams

type GuiParams struct {
	Data         NerdFonts
	Database     *sql.DB
	DownloadPath string
	ExtractPath  string
}

type InstallCmd

type InstallCmd struct {
	Fonts []string `arg:"positional" help:"list of space separated fonts to install"`
}

type ListCmd

type ListCmd struct {
	Installed bool `arg:"-i" help:"list only installed fonts"`
}

type NerdFonts

type NerdFonts struct {
	Version string `json:"tag_name"`
	Fonts   []Font `json:"assets"`
}

func (NerdFonts) GetFont

func (fs NerdFonts) GetFont(f string) Font

func (NerdFonts) GetFonts

func (fs NerdFonts) GetFonts() []Font

func (NerdFonts) GetFontsNames

func (fs NerdFonts) GetFontsNames() []string

func (NerdFonts) GetVersion

func (fs NerdFonts) GetVersion() string

type Paths

type Paths struct {
	Download string
	Install  string
	Db       string
}

func (*Paths) GetDbPath

func (p *Paths) GetDbPath() string

func (*Paths) GetDownloadPath

func (p *Paths) GetDownloadPath() string

func (*Paths) GetInstallPath

func (p *Paths) GetInstallPath() string

type UninstallCmd

type UninstallCmd struct {
	Fonts []string `arg:"positional" help:"list of space separated fonts to uninstall"`
}

type UpdateCmd

type UpdateCmd struct {
	Update bool `default:"true"`
}

Jump to

Keyboard shortcuts

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