file

package
v2.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backup added in v2.2.0

type Backup struct {
	Changes     Changes  `json:"changes"`
	CleanedDirs []string `json:"cleaned_dirs,omitempty"`
}

func (Backup) RenderJSON added in v2.2.0

func (b Backup) RenderJSON(w io.Writer) error

type Change

type Change struct {
	Error         error                  `json:"error,omitempty"`
	PrimaryPair   *Change                `json:"-"`
	ExiftoolData  *exiftool.FileMetadata `json:"-"`
	ID3Data       *ID3                   `json:"-"`
	HashData      map[string]string      `json:"-"`
	Status        status.Status          `json:"status"`
	OriginalName  string                 `json:"-"`
	Source        string                 `json:"source"`
	Target        string                 `json:"target"`
	TargetDir     string                 `json:"target_dir"`
	BaseDir       string                 `json:"base_dir"`
	SourcePath    string                 `json:"-"`
	TargetPath    string                 `json:"-"`
	Steps         []string               `json:"-"`
	CSVRow        []string               `json:"-"`
	SortCriterion struct {
		TimeVar   time.Time
		Time      time.Time
		StringVar string
		IntVar    int
		Size      int64
	} `json:"-"`
	Position        int        `json:"-"`
	Mu              sync.Mutex `json:"-"`
	IsDir           bool       `json:"is_dir"`
	WillOverwrite   bool       `json:"-"`
	MatchesFindCond bool       `json:"-"`
}

Change represents a single renaming change.

func (*Change) AutoFixTarget

func (c *Change) AutoFixTarget(newTarget string)

AutoFixTarget sets the new target name.

func (*Change) LogValue added in v2.2.0

func (c *Change) LogValue() slog.Value

type Changes

type Changes []*Change

func (Changes) LogValue added in v2.2.0

func (c Changes) LogValue() slog.Value

func (Changes) RenderJSON

func (c Changes) RenderJSON(w io.Writer) error

func (Changes) RenderTable

func (c Changes) RenderTable(w io.Writer, noColor bool)

func (Changes) ShouldExtractExiftool added in v2.2.0

func (c Changes) ShouldExtractExiftool() bool

func (Changes) SourceNamesWithIndices added in v2.2.0

func (c Changes) SourceNamesWithIndices(
	withPair bool,
) (names []string, indices []int)

type ID3 added in v2.2.3

type ID3 struct {
	Format      string
	FileType    string
	Title       string
	Album       string
	Artist      string
	AlbumArtist string
	Genre       string
	Composer    string
	Year        int
	Track       int
	TotalTracks int
	Disc        int
	TotalDiscs  int
}

ID3 represents id3 data from an audio file.

Jump to

Keyboard shortcuts

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