card

package
v1.8.10 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CardCommand

func CardCommand() (string, error)

func CardImage

func CardImage(imageURL string) (imageData string, protocol string, err error)

CardImage downloads and renders an image using Kitty protocol if supported, otherwise Sixel.

Types

type CardsModel

type CardsModel struct {
	AllRows           []table.Row
	Choice            string
	Error             error
	IllustratorMap    map[string]string
	ImageMap          map[string]string
	Loading           bool
	PriceMap          map[string]string
	Quitting          bool
	RegulationMarkMap map[string]string
	Search            textinput.Model
	SelectedOption    string
	SeriesName        string
	SetID             string
	Spinner           spinner.Model
	Table             table.Model
	TableStyles       table.Styles
	ViewImage         bool
}

func CardsList

func CardsList(setID string) (CardsModel, error)

CardsList returns a minimal model - data fetching happens via Init()

func (CardsModel) Init

func (m CardsModel) Init() tea.Cmd

func (CardsModel) Update

func (m CardsModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (CardsModel) View

func (m CardsModel) View() string

type ImageModel

type ImageModel struct {
	CardName  string
	ImageURL  string
	Error     error
	Loading   bool
	Spinner   spinner.Model
	ImageData string
	Protocol  string
}

func ImageRenderer

func ImageRenderer(cardName string, imageURL string) ImageModel

func (ImageModel) Init

func (m ImageModel) Init() tea.Cmd

func (ImageModel) Update

func (m ImageModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (ImageModel) View

func (m ImageModel) View() string

type SeriesModel

type SeriesModel struct {
	List     list.Model
	Choice   string
	SeriesID string
	Quitting bool
}

func SeriesList

func SeriesList() SeriesModel

func (SeriesModel) Init

func (m SeriesModel) Init() tea.Cmd

func (SeriesModel) Update

func (m SeriesModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (SeriesModel) View

func (m SeriesModel) View() string

type SetsModel

type SetsModel struct {
	Choice     string
	Error      error
	Loading    bool
	List       list.Model
	Quitting   bool
	SeriesName string
	SetID      string
	SetsIDMap  map[string]string // Maps set name -> set_id
	Spinner    spinner.Model
}

func SetsList

func SetsList(seriesID string) (SetsModel, error)

SetsList returns a minimal model - data fetching happens via Init()

func (SetsModel) Init

func (m SetsModel) Init() tea.Cmd

func (SetsModel) Update

func (m SetsModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (SetsModel) View

func (m SetsModel) View() string

Jump to

Keyboard shortcuts

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