Documentation ¶
Index ¶
- Constants
- Variables
- func CheckError(err error, messages ...string)
- func SortImages(orderFunctionName string, images JsonImages)
- func UpdateThumbnails(folder *FolderContent, sizeList IntList, maxThreads int)
- type ByTimeDesc
- type ChromecastImage
- type FolderConfig
- type FolderContent
- type IntList
- type JsonDirs
- type JsonImages
- type MetaJson
- type MetaJsonImage
- type MetaJsonMeta
- type MetaJsonSubDir
- type RotationAction
Constants ¶
View Source
const ( FILE_REGEXP = `(?i)\.jpe?g$` THUMB_DIR = ".thumbs" CONTENT_INI = "content.ini" META_NAME = "meta.json" META_NAME_CHROMECAST = "meta_cc.jsonp.js" META_NAME_LAST_X = "meta-last.json" META_NAME_FIRST_X = "meta-first.json" CC_PREFIX = "ifsImagesDataCallback(" CC_SUFFIX = ");" )
View Source
const ( NO_ROTATION = iota ROTATE_90 ROTATE_180 ROTATE_270 )
Variables ¶
View Source
var IMAGE_ORDER_FUNCTIONS = [...]string{"exifTimeAsc", "exifTimeDesc", "filenameAsc", "filenameDesc"}
available image order functions
Functions ¶
func CheckError ¶
func SortImages ¶
func SortImages(orderFunctionName string, images JsonImages)
func UpdateThumbnails ¶
func UpdateThumbnails(folder *FolderContent, sizeList IntList, maxThreads int)
Creates thumbnails recursively for the given folder using a thread pool with NumCPU of threads. folder - works on this folder sizeList - creates thumbnails for this sizes. The size represents the maximum bounding box.
Types ¶
type ByTimeDesc ¶
type ByTimeDesc struct{ JsonDirs }
func (ByTimeDesc) Less ¶
func (s ByTimeDesc) Less(i, j int) bool
type ChromecastImage ¶
type FolderConfig ¶
type FolderContent ¶
type FolderContent struct { FullPath string Name string Time *int64 Title string Config FolderConfig Files []string ImageMetadata map[string]MetaJsonImage Folder []FolderContent }
func (*FolderContent) GetFolderTitle ¶
func (fc *FolderContent) GetFolderTitle() string
func (*FolderContent) GetFullPathFile ¶
func (fc *FolderContent) GetFullPathFile(file string) string
func (*FolderContent) String ¶
func (fc *FolderContent) String() string
func (*FolderContent) StringWithIntent ¶
func (fc *FolderContent) StringWithIntent(intention int) string
type JsonDirs ¶
type JsonDirs []MetaJsonSubDir
type JsonImages ¶
type JsonImages []MetaJsonImage
func (JsonImages) Len ¶
func (s JsonImages) Len() int
func (JsonImages) Swap ¶
func (s JsonImages) Swap(i, j int)
type MetaJson ¶
type MetaJson struct { Meta MetaJsonMeta `json:"meta"` Images []MetaJsonImage `json:"images"` SubDirs []MetaJsonSubDir `json:"subDirs"` }
type MetaJsonImage ¶
type MetaJsonImage struct { Filename string `json:"filename"` Width int `json:"width"` Height int `json:"height"` Exif metaJsonExif `json:"exif"` Rotate RotationAction `json:"-"` }
type MetaJsonMeta ¶
type MetaJsonSubDir ¶
type RotationAction ¶
type RotationAction int
Click to show internal directories.
Click to hide internal directories.