generators

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: BSD-3-Clause Imports: 7 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const ALL_STATS = "commits,prs,reviews,issues,stars,repos,followers"

Variables

View Source
var SvgTemplate string

Functions

func GenerateCard

func GenerateCard(languages []*Language, streak *requests.StreakStats, stats *requests.GlobalStats, showStreaks bool, showStats bool, statsFeatures string, output string) string

Types

type CardData

type CardData struct {
	Languages *LanguagesSection
	Stats     *StatsSection
	Streaks   *StreaksSection
	Height    int
}

type LangSvg

type LangSvg struct {
	Language   *Language
	Percentage string
	Offset     int
	Delay      int
}

type Language

type Language struct {
	Name       string
	Color      string
	Percentage float64
}

type LanguageSize

type LanguageSize struct {
	Language *Language
	Size     float64
	X        float64
}

type LanguagesSection

type LanguagesSection struct {
	Sizes  []LanguageSize
	Left   []*LangSvg
	Right  []*LangSvg
	Height int
}

func NewLanguagesSection

func NewLanguagesSection(languages []*Language, barWidth int) *LanguagesSection

type StatItem

type StatItem struct {
	Label string
	Value string
	Y     int
}

type StatsFeature

type StatsFeature string
const (
	Repos   StatsFeature = "repos"
	Stars   StatsFeature = "stars"
	Forks   StatsFeature = "forks"
	Commits StatsFeature = "commits"
	PRs     StatsFeature = "prs"
	Reviews StatsFeature = "reviews"
	Issues  StatsFeature = "issues"
)

type StatsSection

type StatsSection struct {
	Items  []StatItem
	Height int
}

func NewStatsSection

func NewStatsSection(stats *requests.GlobalStats, show bool, featuresFilter string, formatCount func(int) string) *StatsSection

type StreaksSection

type StreaksSection struct {
	Data   *requests.StreakStats
	Height int
}

func NewStreaksSection

func NewStreaksSection(streak *requests.StreakStats, show bool) *StreaksSection

Jump to

Keyboard shortcuts

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