file

package
v0.0.0-...-906ada0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InferPattern

func InferPattern(
	fsys fs.FS,
	dir string,
) (*regexps.Regexp[Match], error)

Check if all files in a directory match a particular pattern. If they do, we can reasonable say that's what the user wants.

func RenameAllFiles

func RenameAllFiles(
	fsys fs.FS,
	dir string,
	pattern *regexps.Regexp[Match],
	dry bool,
	outputTemplate string,
) error

Types

type Match

type Match struct {
	ShowName string `regexps:"name,required"`
	Season   int    `regexps:"season,required"`
	Episode  int    `regexps:"episode,required"`
	Title    string `regexps:"title,required"`
}

Jump to

Keyboard shortcuts

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