aggregate

package
v0.0.34 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClusterByNumbers

func ClusterByNumbers(flags models.GlobalFlags, media []models.MediaWithDB) []models.FolderStats

ClusterByNumbers groups media items by numerical similarity

func ClusterFoldersByName

func ClusterFoldersByName(flags models.GlobalFlags, folders []models.FolderStats) []models.FolderStats

ClusterFoldersByName groups folder stats by name similarity

func ClusterFoldersByNumbers

func ClusterFoldersByNumbers(flags models.GlobalFlags, folders []models.FolderStats) []models.FolderStats

ClusterFoldersByNumbers groups folder stats by numerical similarity

func ClusterPaths

func ClusterPaths(flags models.GlobalFlags, lines []string) []models.FolderStats

ClusterPaths groups lines of text using TF-IDF and KMeans

func FilterNearDuplicates

func FilterNearDuplicates(groups []models.FolderStats) []models.FolderStats

FilterNearDuplicates breaks down existing groups further by string similarity

func GroupByParent

func GroupByParent(media []models.MediaWithDB) []models.FolderStats

GroupByParent groups media items by their parent directory

func IsSameFolderGroup

func IsSameFolderGroup(flags models.GlobalFlags, f0, f models.FolderStats) bool

IsSameFolderGroup checks if two FolderStats are similar enough to be grouped

func IsSameGroup

func IsSameGroup(flags models.GlobalFlags, m0, m models.MediaWithDB) bool

IsSameGroup checks if two media items are similar enough to be grouped

func SortFolders

func SortFolders(folders []FolderStats, sortBy string, reverse bool)

SortFolders sorts folder stats

Types

type FolderStats

type FolderStats struct {
	Path          string         `json:"path"`
	Count         int            `json:"count"`
	TotalSize     int64          `json:"total_size"`
	TotalDuration int64          `json:"total_duration"`
	AvgSize       int64          `json:"avg_size"`
	AvgDuration   int64          `json:"avg_duration"`
	Files         []models.Media `json:"files,omitempty"`
}

FolderStats aggregates media by folder

func ByFolder

func ByFolder(media []models.Media) []FolderStats

ByFolder groups media by parent directory

type PathObservation

type PathObservation struct {
	Path   string
	Vector clusters.Coordinates
}

func (PathObservation) Coordinates

func (p PathObservation) Coordinates() clusters.Coordinates

func (PathObservation) Distance

Jump to

Keyboard shortcuts

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