season

package module
v0.0.0-...-6bd3c29 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

README

season

season is a utility for quickly renaming sets of files according to an opinionated set of rules with the end result that they are parseable by the Plex Media Server as a TV show.

This utility was designed exclusively to help me with transforming a large number of online course videos I had downloaded that were named in entirely disparate ways, causing Plex to fail to correctly organize and present them.

There is no guarantee that this utility will work correctly for any other material, so use it at your own risk. See below for instructions on how to verify the intended output before actually going through with the renaming process.

Install

This is currently only available as a Go packge, so you will need Go version 1.11 or higher to install it.

$ go install github.com/haleyrc/season/cmd/season

Usage

Usage: season [OPTION]...

If no option is provided, season will process the files in the current directory
and print a list of the proposed renames to stderr.

The following options are available:

  -h, --help      Display this usage and exit. Overrides other options.
  --remove=EXP    Remove the expression given by EXP from each filename prior
                  to running the standard normalization routines.
  --confirm       Rename all files in the current directory according to the
                  normalization rules. Applies any additional preprocessing
                  given by the remove option prior to normalization.

Exit status:
  0  if ok
  1  if error
  2  if help option provided

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileMod

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

type FileMods

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

func NewFileMods

func NewFileMods(base string) FileMods

func ScanV2

func ScanV2(base string, opts ...Option) (FileMods, error)

func (FileMods) Display

func (mods FileMods) Display(w io.Writer)

Display prints information about the path and the files to be renamed, along with their transformed name for review by the user.

func (FileMods) Move

func (mods FileMods) Move() []error

Move moves each file from its original location to its modified location within the same base path.

type Option

type Option func(cfg *scanConfig)

func WithDebug

func WithDebug(on bool) Option

func WithGarbage

func WithGarbage(g string) Option

func WithNested

func WithNested(on bool) Option

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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