Documentation ¶
Index ¶
- func FindFilesWithExt(folder, extension string) []string
- func FindImages(sourcesDir, exportsDir string, extensions []string) ([]*Raw, []*Xmp, []*Jpg)
- func IsDir(path string) (bool, error)
- type ImagePath
- func (i *ImagePath) Exists() bool
- func (i *ImagePath) GetBaseDir() string
- func (i *ImagePath) GetBasename() string
- func (i *ImagePath) GetFullDir() string
- func (i *ImagePath) GetFullPath() string
- func (i *ImagePath) GetImageBase() string
- func (i *ImagePath) GetRelativeDir() string
- func (i *ImagePath) GetRelativePath() string
- func (i *ImagePath) GetVSequence() string
- type Jpg
- type LinkedImage
- type Raw
- func (raw *Raw) AddJpg(jpg *Jpg)
- func (raw *Raw) AddXmp(xmp *Xmp)
- func (raw *Raw) Delete(dryRun bool) error
- func (raw *Raw) GetJpgPath(jpgDir string) string
- func (i *Raw) GetPath() string
- func (raw *Raw) GetRawExt() string
- func (raw *Raw) StageForDeletion(dryRun bool) error
- func (raw Raw) String() string
- func (raw *Raw) Sync(exportParams darktable.ExportParams, dstDir string) error
- type Xmp
- func (xmp *Xmp) Delete(dryRun bool) error
- func (xmp *Xmp) GetBasename() string
- func (xmp *Xmp) GetJpgPath(jpgDir string) string
- func (i *Xmp) GetPath() string
- func (xmp *Xmp) GetRawExt() string
- func (xmp *Xmp) IsVirtualCopy() bool
- func (xmp *Xmp) LinkJpg(jpg *Jpg)
- func (xmp *Xmp) LinkRaw(raw *Raw)
- func (xmp *Xmp) StageForDeletion(dryRun bool) error
- func (xmp Xmp) String() string
- func (xmp *Xmp) Sync(exportParams darktable.ExportParams, dstDir string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindFilesWithExt ¶
FindFilesWithExt recursively scans a directory for files with the specified extension
func FindImages ¶
List all raws, xmps, and jpgs found in the sources and exports dir Each returned object includes any linked objects that were detected
Types ¶
type ImagePath ¶
type ImagePath struct {
// contains filtered or unexported fields
}
ImagePath provides convenience methods to access various properties of an image file's path Works for raw files, jpg files, and xmp files that follow the convention <ParentDir>/<RelativeDir>/<ImageBase>_<VSequence>.<RawExt>.xmp
func (*ImagePath) GetBaseDir ¶
GetBaseDir returns the directory where image files are found
func (*ImagePath) GetBasename ¶
GetBasename strips the directories and suffixes some/dir/subdir/DSC1234_01.ARW.xmp => DSC1234_01
func (*ImagePath) GetFullDir ¶
func (*ImagePath) GetFullPath ¶
func (*ImagePath) GetImageBase ¶
GetImageBase gets the base image name, without extensions or virtual copy sequences _DSc1234_01.ARW.xmp => _DSC1234
func (*ImagePath) GetRelativeDir ¶
GetRelativeDir returns the directory of fullPath relative to baseDir E.g. GetRelativeDir("/mnt/some/dir/filename.txt", "/mnt") -> "some/dir"
func (*ImagePath) GetRelativePath ¶
GetRelativePath returns the value of fullPath relative to baseDir E.g. GetRelativePath("/mnt/some/dir/filename.txt", "/mnt") -> "some/dir/filename.txt"
func (*ImagePath) GetVSequence ¶
Get the base image name, without extensions or virtual copy sequences _DSc1234_01.ARW.xmp => _DSC1234
type Jpg ¶
func (*Jpg) IsVirtualCopy ¶
type LinkedImage ¶
type Raw ¶
type Raw struct { Path ImagePath Xmps map[string]*Xmp Jpgs map[string]*Jpg // contains filtered or unexported fields }
func FindRaw ¶
FindRaw looks for a raw file at the specified path The returned object includes any linked objects that were detected
func (*Raw) GetJpgPath ¶
GetJpgPath gets the jpg filename for a raw file
func (*Raw) StageForDeletion ¶
type Xmp ¶
func FindXmp ¶
FindXmp looks for an xmp file at the specified path The returned object includes any linked objects that were detected
func (*Xmp) GetBasename ¶
Gets file name without directory or extension(s)
func (*Xmp) GetJpgPath ¶
GetJpgPath gets the jpg filename for an xmp file This implementation assumes the only thing after the first "." is 'xmp' or '<raw-ext>.xmp'
func (*Xmp) GetRawExt ¶
GetRawExt gets the extension of the linked raw file Does not work for Adobe style xmps where raw extension is missing