stomvu

package
v0.0.0-...-ea0be71 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

"Move utils" - logic for moving files to hierarchies sensible for TV shows, photo albums etc.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Entrypoint

func Entrypoint() *cobra.Command

func ExecutePlan

func ExecutePlan(plan *Plan) error

does what plan suggested to do

func PhotoOrVideoDateFromFilename

func PhotoOrVideoDateFromFilename(name string) string

Types

type PhotoResult

type PhotoResult struct {
	DateString string
}

func (*PhotoResult) String

func (p *PhotoResult) String() string

type Plan

type Plan struct {
	Dir              string // directory in which both FileTargets and DirectoryTargets reside
	FileTargets      []*PlanTarget
	DirectoryTargets []*PlanTarget
	Dunno            []string // includes both files and folders
}

func ComputePlan

func ComputePlan(dir string, targetFn func(string) string) (*Plan, error)

func (*Plan) InsertFile

func (p *Plan) InsertFile(source string, targetDir string)

func (*Plan) NumSources

func (p *Plan) NumSources() int

total number of sources in all plan targets (= num of files and directories to move)

type PlanTarget

type PlanTarget struct {
	Target  string
	Sources []string
}

Jump to

Keyboard shortcuts

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