Documentation ¶
Index ¶
- Constants
- Variables
- func ExecuteConfigTemplate(data Result, pathTemplate string) (string, error)
- type Config
- type FilePath
- type LatLng
- type Locator
- type MetaData
- type Processor
- func (p Processor) DuplicateFiles() int
- func (p Processor) ProcessAll(folders []string, loc *Locator) (map[string]Result, error)
- func (p Processor) ProcessedFiles() int
- func (p Processor) Reset()
- func (p Processor) Start() map[string]Result
- func (p Processor) VisitFolders(folders []string, done <-chan struct{}) (<-chan FilePath, <-chan error)
- type Result
Constants ¶
View Source
const ( // FileTypeOther is an unkown file format. FileTypeOther = "unknown" // FileTypeYaml is a yaml file format. // FileTypeYaml = "yml" // FileTypeJpeg is a jpeg file format. FileTypeJpeg = "jpg" // FileTypePng is a png file format. FileTypePng = "png" // FileTypeRaw is a raw file format. FileTypeRaw = "raw" // FileTypeXmp is an xmp file format. FileTypeXmp = "xmp" // FileTypeAae is an aae file format. FileTypeAae = "aae" // FileTypeMovie is a movie file format. FileTypeMovie = "mov" // FileTypeHEIF High Efficiency Image File Format FileTypeHEIF = "heif" // High Efficiency Image File Format )
View Source
const (
// MimeTypeJpeg is jpeg image type
MimeTypeJpeg = "image/jpeg"
)
Variables ¶
View Source
var FileExtensions = map[string]string{ ".crw": FileTypeRaw, ".cr2": FileTypeRaw, ".nef": FileTypeRaw, ".arw": FileTypeRaw, ".dng": FileTypeRaw, ".mov": FileTypeMovie, ".avi": FileTypeMovie, ".jpg": FileTypeJpeg, ".thm": FileTypeJpeg, ".jpeg": FileTypeJpeg, ".xmp": FileTypeXmp, ".aae": FileTypeAae, ".heif": FileTypeHEIF, ".heic": FileTypeHEIF, ".3fr": FileTypeRaw, ".ari": FileTypeRaw, ".bay": FileTypeRaw, ".cr3": FileTypeRaw, ".cap": FileTypeRaw, ".data": FileTypeRaw, ".dcs": FileTypeRaw, ".dcr": FileTypeRaw, ".drf": FileTypeRaw, ".eip": FileTypeRaw, ".erf": FileTypeRaw, ".fff": FileTypeRaw, ".gpr": FileTypeRaw, ".iiq": FileTypeRaw, ".k25": FileTypeRaw, ".kdc": FileTypeRaw, ".mdc": FileTypeRaw, ".mef": FileTypeRaw, ".mos": FileTypeRaw, ".mrw": FileTypeRaw, ".nrw": FileTypeRaw, ".obm": FileTypeRaw, ".orf": FileTypeRaw, ".pef": FileTypeRaw, ".ptx": FileTypeRaw, ".pxn": FileTypeRaw, ".r3d": FileTypeRaw, ".raf": FileTypeRaw, ".raw": FileTypeRaw, ".rwl": FileTypeRaw, ".rw2": FileTypeRaw, ".rwz": FileTypeRaw, ".sr2": FileTypeRaw, ".srf": FileTypeRaw, ".srw": FileTypeRaw, ".tif": FileTypeRaw, ".x3f": FileTypeRaw, }
FileExtensions lists all the available and supported image file formats.
Functions ¶
Types ¶
type Locator ¶
type Locator struct { Locations []string // contains filtered or unexported fields }
Locator ...
func CreateLocatorFromCSV ¶
CreateLocatorFromCSV ...
func (*Locator) FindNearest ¶
FindNearest finds nearest town given some coordinates
type Processor ¶
type Processor struct { DB *cache.Cache // contains filtered or unexported fields }
func (Processor) DuplicateFiles ¶
func (Processor) ProcessAll ¶
ProcessAll reads all the files in the file tree rooted at root and returns a map from file path to the MD5 sum of the file's contents. If the directory walk fails or any read operation fails, ProcessAll returns an error. In that case, ProcessAll does not wait for inflight read operations to complete.
func (Processor) ProcessedFiles ¶
Click to show internal directories.
Click to hide internal directories.