showcase

package
v0.8.6 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2025 License: BSD-2-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatLanguagesWithPercentages

func FormatLanguagesWithPercentages(languages []LanguageStats) string

FormatLanguagesWithPercentages formats languages with their percentages

Types

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

Generator handles showcase generation for repositories

func New

func New(cfg *config.Config, workDir string) *Generator

New creates a new showcase generator

func (*Generator) GenerateShowcase

func (g *Generator) GenerateShowcase(repoFilter []string, forceRegenerate bool) error

GenerateShowcase generates a showcase for repositories If repoFilter is provided, only those repositories are processed If repoFilter is empty/nil, all repositories in work directory are processed

func (*Generator) SetAITool added in v0.8.1

func (g *Generator) SetAITool(tool string)

SetAITool sets the AI tool to use for generating summaries

type LanguageStats

type LanguageStats struct {
	Name       string
	Lines      int
	Percentage float64
}

LanguageStats holds statistics for a programming language

type LegacyRepoMetadata

type LegacyRepoMetadata struct {
	Languages       []string
	CommitCount     int
	LinesOfCode     int
	FirstCommitDate string
	LastCommitDate  string
	License         string
	AvgCommitAge    float64
}

LegacyRepoMetadata for backwards compatibility with old cache files

type ProjectSummary

type ProjectSummary struct {
	Name         string
	Summary      string
	CodebergURL  string
	GitHubURL    string
	Metadata     *RepoMetadata
	Images       []string // Relative paths to images in showcase directory
	CodeSnippet  string   // Code snippet to show when no images
	CodeLanguage string   // Language and file info for the snippet
	AIAssisted   bool     // Whether AI was detected in the project
	VibeCoded    bool     // Whether the project was vibe-coded
}

ProjectSummary holds the summary information for a project

type RepoMetadata

type RepoMetadata struct {
	Languages       []LanguageStats // Programming languages with usage statistics
	Documentation   []LanguageStats // Documentation/text files with usage statistics
	CommitCount     int
	LinesOfCode     int // Lines of code (excluding documentation)
	LinesOfDocs     int // Lines of documentation
	FirstCommitDate string
	LastCommitDate  string
	License         string
	AvgCommitAge    float64 // Average age of last 42 commits in days
	LatestTag       string  // Latest version tag (empty if no tags)
	LatestTagDate   string  // Date of the latest tag (empty if no tags)
	HasReleases     bool    // Whether the project has any releases/tags
}

RepoMetadata holds metadata about a repository

Jump to

Keyboard shortcuts

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