Documentation
¶
Overview ¶
Package output handles formatting and displaying results to the terminal.
It supports multiple output formats:
- table: Human-readable aligned columns (default)
- json: Machine-readable JSON output
- plain: Simple text, one item per line
Index ¶
- type Format
- type Formatter
- func (f *Formatter) PrintCategories(categories []models.Category)
- func (f *Formatter) PrintChapters(chapters []models.Chapter)
- func (f *Formatter) PrintCuepoints(cuepoints []models.Cuepoint)
- func (f *Formatter) PrintDeviceStatistics(stats []models.DeviceStatistics)
- func (f *Formatter) PrintEpisode(episode *models.Episode)
- func (f *Formatter) PrintEpisodeStatistics(stats *models.EpisodeOverallStatistics)
- func (f *Formatter) PrintEpisodes(episodes []models.Episode)
- func (f *Formatter) PrintEpisodesPlayTotals(stats []models.EpisodePlayTotals)
- func (f *Formatter) PrintError(err error)
- func (f *Formatter) PrintExploreShows(shows []models.ExploreShow)
- func (f *Formatter) PrintFollowersStatistics(stats []models.FollowersStatistics)
- func (f *Formatter) PrintGeographicStatistics(stats *models.GeographicStatistics)
- func (f *Formatter) PrintGooglePlayCategories(categories []models.GooglePlayCategory)
- func (f *Formatter) PrintKeyValue(pairs [][2]string)
- func (f *Formatter) PrintLanguages(languages []models.Language)
- func (f *Formatter) PrintLikesStatistics(stats []models.LikesStatistics)
- func (f *Formatter) PrintListenersStatistics(stats []models.ListenersStatistics)
- func (f *Formatter) PrintMessage(msg string)
- func (f *Formatter) PrintMessages(messages []models.Message)
- func (f *Formatter) PrintOSStatistics(stats *models.OSStatisticsBreakdown)
- func (f *Formatter) PrintPlayStatistics(stats []models.PlayStatistics)
- func (f *Formatter) PrintShow(show *models.Show)
- func (f *Formatter) PrintShowStatistics(stats *models.ShowOverallStatistics)
- func (f *Formatter) PrintShows(shows []models.Show)
- func (f *Formatter) PrintShowsPlayTotals(stats []models.ShowPlayTotals)
- func (f *Formatter) PrintSourcesStatistics(stats *models.SourcesStatistics)
- func (f *Formatter) PrintStatistics(stats *models.Statistics)
- func (f *Formatter) PrintSuccess(msg string)
- func (f *Formatter) PrintUser(user *models.User)
- func (f *Formatter) PrintUserStatistics(stats *models.UserOverallStatistics)
- func (f *Formatter) PrintUsers(users []models.User)
- func (f *Formatter) PrintWarning(msg string)
- func (f *Formatter) StartProgressBar(total int, title string) *pterm.ProgressbarPrinter
- func (f *Formatter) StartSpinner(msg string) *pterm.SpinnerPrinter
- func (f *Formatter) StopSpinner(spinner *pterm.SpinnerPrinter, success bool, msg string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Formatter ¶
type Formatter struct {
// contains filtered or unexported fields
}
func (*Formatter) PrintCategories ¶
func (*Formatter) PrintChapters ¶
func (*Formatter) PrintCuepoints ¶
func (*Formatter) PrintDeviceStatistics ¶
func (f *Formatter) PrintDeviceStatistics(stats []models.DeviceStatistics)
PrintDeviceStatistics prints device breakdown statistics.
func (*Formatter) PrintEpisode ¶
func (*Formatter) PrintEpisodeStatistics ¶
func (f *Formatter) PrintEpisodeStatistics(stats *models.EpisodeOverallStatistics)
PrintEpisodeStatistics prints episode overall statistics.
func (*Formatter) PrintEpisodes ¶
func (*Formatter) PrintEpisodesPlayTotals ¶
func (f *Formatter) PrintEpisodesPlayTotals(stats []models.EpisodePlayTotals)
PrintEpisodesPlayTotals prints play totals for each episode.
func (*Formatter) PrintError ¶
func (*Formatter) PrintExploreShows ¶
func (f *Formatter) PrintExploreShows(shows []models.ExploreShow)
PrintExploreShows prints a list of shows from explore endpoints.
func (*Formatter) PrintFollowersStatistics ¶
func (f *Formatter) PrintFollowersStatistics(stats []models.FollowersStatistics)
PrintFollowersStatistics prints time-series followers statistics.
func (*Formatter) PrintGeographicStatistics ¶
func (f *Formatter) PrintGeographicStatistics(stats *models.GeographicStatistics)
PrintGeographicStatistics prints geographic breakdown statistics.
func (*Formatter) PrintGooglePlayCategories ¶
func (f *Formatter) PrintGooglePlayCategories(categories []models.GooglePlayCategory)
func (*Formatter) PrintKeyValue ¶ added in v1.2.1
PrintKeyValue renders a detail view with key-value pairs.
func (*Formatter) PrintLanguages ¶
func (*Formatter) PrintLikesStatistics ¶
func (f *Formatter) PrintLikesStatistics(stats []models.LikesStatistics)
PrintLikesStatistics prints time-series likes statistics.
func (*Formatter) PrintListenersStatistics ¶
func (f *Formatter) PrintListenersStatistics(stats []models.ListenersStatistics)
PrintListenersStatistics prints time-series listeners statistics.
func (*Formatter) PrintMessage ¶
func (*Formatter) PrintMessages ¶
func (*Formatter) PrintOSStatistics ¶
func (f *Formatter) PrintOSStatistics(stats *models.OSStatisticsBreakdown)
PrintOSStatistics prints operating system breakdown statistics.
func (*Formatter) PrintPlayStatistics ¶
func (f *Formatter) PrintPlayStatistics(stats []models.PlayStatistics)
PrintPlayStatistics prints time-series play statistics.
func (*Formatter) PrintShowStatistics ¶
func (f *Formatter) PrintShowStatistics(stats *models.ShowOverallStatistics)
PrintShowStatistics prints show overall statistics.
func (*Formatter) PrintShows ¶
func (*Formatter) PrintShowsPlayTotals ¶
func (f *Formatter) PrintShowsPlayTotals(stats []models.ShowPlayTotals)
PrintShowsPlayTotals prints play totals for each show.
func (*Formatter) PrintSourcesStatistics ¶
func (f *Formatter) PrintSourcesStatistics(stats *models.SourcesStatistics)
PrintSourcesStatistics prints sources breakdown statistics.
func (*Formatter) PrintStatistics ¶
func (f *Formatter) PrintStatistics(stats *models.Statistics)
PrintStatistics prints overall statistics
func (*Formatter) PrintSuccess ¶
func (*Formatter) PrintUserStatistics ¶
func (f *Formatter) PrintUserStatistics(stats *models.UserOverallStatistics)
PrintUserStatistics prints user overall statistics.
func (*Formatter) PrintUsers ¶
func (*Formatter) PrintWarning ¶ added in v1.2.1
func (*Formatter) StartProgressBar ¶ added in v1.2.1
func (f *Formatter) StartProgressBar(total int, title string) *pterm.ProgressbarPrinter
StartProgressBar starts a progress bar. Returns nil if color is disabled.
func (*Formatter) StartSpinner ¶ added in v1.2.1
func (f *Formatter) StartSpinner(msg string) *pterm.SpinnerPrinter
StartSpinner starts a spinner with the given message. Returns nil if color is disabled.
func (*Formatter) StopSpinner ¶ added in v1.2.1
func (f *Formatter) StopSpinner(spinner *pterm.SpinnerPrinter, success bool, msg string)
StopSpinner stops a spinner with a success or failure message.