core

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CSSDir = ".obsidian_cache/css"

Functions

func DiffCSS

func DiffCSS(versionA, versionB string) *models.DiffResult

func ExportTLDR added in v0.3.0

func ExportTLDR(t *TLDRResult, path, format string) error

func ExtractCSS

func ExtractCSS(version string) (string, error)

func ImportFile added in v0.3.0

func ImportFile(srcPath, label string) (string, error)

func SemverBump

func SemverBump(a, b string) string

Types

type TLDRResult

type TLDRResult struct {
	VersionA               string           `json:"version_a" yaml:"version_a" toml:"version_a"`
	VersionB               string           `json:"version_b" yaml:"version_b" toml:"version_b"`
	VersionADate           string           `json:"version_a_date,omitempty" yaml:"version_a_date,omitempty" toml:"version_a_date,omitempty"`
	VersionBDate           string           `json:"version_b_date,omitempty" yaml:"version_b_date,omitempty" toml:"version_b_date,omitempty"`
	SemverBump             string           `json:"semver_bump" yaml:"semver_bump" toml:"semver_bump"`
	AdditionsLOC           int              `json:"additions_loc" yaml:"additions_loc" toml:"additions_loc"`
	DeletionsLOC           int              `json:"deletions_loc" yaml:"deletions_loc" toml:"deletions_loc"`
	SelectorsAdded         []string         `json:"selectors_added" yaml:"selectors_added" toml:"selectors_added"`
	SelectorsRemoved       []string         `json:"selectors_removed" yaml:"selectors_removed" toml:"selectors_removed"`
	CSSVariablesAdded      []string         `json:"css_variables_added" yaml:"css_variables_added" toml:"css_variables_added"`
	CSSVariablesRemoved    []string         `json:"css_variables_removed" yaml:"css_variables_removed" toml:"css_variables_removed"`
	CSSVariablesChanged    []VariableChange `json:"css_variables_changed" yaml:"css_variables_changed" toml:"css_variables_changed"`
	ImportantCount         int              `json:"important_count" yaml:"important_count" toml:"important_count"`
	AverageSpecificity     float64          `json:"average_specificity" yaml:"average_specificity" toml:"average_specificity"`
	TotalSelectorsAnalyzed int              `json:"total_selectors_analyzed" yaml:"total_selectors_analyzed" toml:"total_selectors_analyzed"`
	ColorCounts            map[string]int   `json:"color_counts,omitempty" yaml:"color_counts,omitempty" toml:"color_counts,omitempty"`
	Specificities          []float64        `json:"-" yaml:"-" toml:"-"`
}

func AnalyzeCSS added in v0.2.0

func AnalyzeCSS(css string) *TLDRResult

func AnalyzeDiff

func AnalyzeDiff(diff string) *TLDRResult

func (*TLDRResult) MarshalJSON

func (r *TLDRResult) MarshalJSON() ([]byte, error)

func (*TLDRResult) MarshalTOML

func (r *TLDRResult) MarshalTOML() ([]byte, error)

func (*TLDRResult) MarshalYAML

func (r *TLDRResult) MarshalYAML() ([]byte, error)

func (*TLDRResult) StatString added in v0.2.0

func (r *TLDRResult) StatString() string

func (*TLDRResult) String

func (r *TLDRResult) String() string

type VariableChange

type VariableChange struct {
	Name     string `json:"name" yaml:"name" toml:"name"`
	OldValue string `json:"old_value" yaml:"old_value" toml:"old_value"`
	NewValue string `json:"new_value" yaml:"new_value" toml:"new_value"`
}

Jump to

Keyboard shortcuts

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