Documentation ¶
Index ¶
- Constants
- Variables
- func AddWarning(client *elastic.Client, id string, newWarnings []string)
- func AliasForPath(path string) (string, error)
- func CheckExec(commandName string, args ...string) (string, error)
- func ConfigureLogging(logDirectory, appName string)
- func ConvertToCountryName(code string, defValue string) string
- func CreateAliasIndex(client *elastic.Client) error
- func CreateClarifaiClassifyIndex(client *elastic.Client) error
- func CreateClient() *elastic.Client
- func CreateDirectory(directory string) error
- func CreateMediaIndex(client *elastic.Client) error
- func DayOfYear(month, day int) int
- func DayOfYearFromDate(date time.Time) int
- func FileExists(path string) (bool, error)
- func FullPathForAliasedPath(aliased string) (string, error)
- func GetIndexFieldName(fieldName string) (string, bool)
- func InitDirectories(appName string)
- func InitializeAliases(client *elastic.Client) error
- func IsExecWorking(commandName string, args ...string) bool
- func IsValidAlias(alias string) bool
- func IsValidAliasedPath(aliased string) bool
- func MaxCpus(desired int) int
- func NumCpus() int
- func PathExists(path string) (bool, error)
- func PathForAlias(alias string) (string, error)
- func RatioNumCpus(factor float32) int
- func ToThumbPath(aliasedPath string) string
- func UpdateLastIndexed(alias string) error
- func VisitAllPaths(callback func(alias AliasDocument))
- type AliasDocument
- type CandidateFile
- type ClassifyMessage
- type DuplicateItem
- type ExifOutput
- type ExifOutputComposite
- type ExifOutputExif
- type ExifOutputFile
- type ExifOutputIptc
- type ExifOutputQuicktime
- type ExifOutputXmp
- type GeoPoint
- type Media
Constants ¶
View Source
const ( MediaTypeImage = "image" MediaTypeVideo = "video" MediaTypeUnknown = "unknown" )
View Source
const AliasTypeName = "alias"
View Source
const DuplicateTypeName = "duplicate"
View Source
const MediaTypeName = "media"
Variables ¶
View Source
var AliasIndexName = "fp-aliases"
View Source
var AliasPathOverride = ""
View Source
var ClarifaiCacheIndexName = "clarifai_cache"
View Source
var ClarifaiTypeName = "document"
View Source
var ConfigDirectory string
View Source
var ElasticSearchServer = "http://localhost:9200"
View Source
var ExecutingDirectory string
View Source
var ExifToolPath string
View Source
var FfmpegPath string
View Source
var HomeDirectory string
View Source
var IndexMakeNoChanges = false
View Source
var IndexerPath string
View Source
var LocationCacheDirectory string
View Source
var LogDirectory string
View Source
var MediaClassifierPath string
View Source
var MediaIndexName = "media-index"
View Source
var RedisServer = "http://localhost:6379"
View Source
var ThumbnailDirectory string
View Source
var VipsThumbnailPath string
Functions ¶
func AddWarning ¶
func AliasForPath ¶
func ConfigureLogging ¶
func ConfigureLogging(logDirectory, appName string)
func ConvertToCountryName ¶
func CreateAliasIndex ¶
func CreateAliasIndex(client *elastic.Client) error
func CreateClarifaiClassifyIndex ¶
func CreateClarifaiClassifyIndex(client *elastic.Client) error
func CreateClient ¶
func CreateClient() *elastic.Client
func CreateDirectory ¶
func CreateMediaIndex ¶
func CreateMediaIndex(client *elastic.Client) error
func DayOfYearFromDate ¶
func FileExists ¶
func FullPathForAliasedPath ¶
func GetIndexFieldName ¶
func InitDirectories ¶
func InitDirectories(appName string)
func IsExecWorking ¶
func IsValidAlias ¶
func IsValidAliasedPath ¶
func PathExists ¶
func PathForAlias ¶
func RatioNumCpus ¶
func ToThumbPath ¶
func UpdateLastIndexed ¶
func VisitAllPaths ¶
func VisitAllPaths(callback func(alias AliasDocument))
Types ¶
type AliasDocument ¶
type CandidateFile ¶
type CandidateFile struct { FullPath string AliasedPath string Signature string LengthInBytes int64 Exif ExifOutput Warnings []string }
func (*CandidateFile) AddWarning ¶
func (cf *CandidateFile) AddWarning(warning string)
type ClassifyMessage ¶
type DuplicateItem ¶
type ExifOutput ¶
type ExifOutput struct { SourceFile string File ExifOutputFile EXIF ExifOutputExif IPTC ExifOutputIptc Quicktime ExifOutputQuicktime XMP ExifOutputXmp Composite ExifOutputComposite }
type ExifOutputComposite ¶
type ExifOutputComposite struct {
GPSPosition string
}
type ExifOutputExif ¶
type ExifOutputExif struct { ApertureValue float32 CreateDate string DateTimeOriginal string ModifyDate string ExposureProgram string ExposureTime interface{} // Sigh - sometimes a number, sometimes a string - 1 is a number, while "1/200" is a string. Probably an exiftool'ism Flash string FNumber float32 FocalLength string GPSLatitudeRef string GPSLatitude string GPSLongitudeRef string GPSLongitude string ISO interface{} // Most cameras use an int, some a string (!) LensInfo string LensModel string Make string Model string WhiteBalance string }
type ExifOutputFile ¶
type ExifOutputIptc ¶
type ExifOutputIptc struct {
Keywords interface{} // Some are []string - others are string. Exiftool seems to be the source
}
type ExifOutputQuicktime ¶
type ExifOutputXmp ¶
type Media ¶
type Media struct { Signature string `json:"signature"` Filename string `json:"filename"` Path string `json:"path"` LengthInBytes int64 `json:"lengthinbytes"` MimeType string `json:"mimetype,omitempty"` Width int `json:"width,omitempty"` Height int `json:"height,omitempty"` DurationSeconds float32 `json:"durationseconds,omitempty"` // EXIF info ApertureValue float32 `json:"aperture,omitempty"` ExposureProgram string `json:"exposureprogram,omitempty"` ExposureTime float32 `json:"exposuretime,omitempty"` ExposureTimeString string `json:"exposuretimestring,omitempty"` Flash string `json:"flash,omitempty"` FNumber float32 `json:"fnumber,omitempty"` FocalLengthMm float32 `json:"focallengthmm,omitempty"` Iso int `json:"iso,omitempty"` WhiteBalance string `json:"whitebalance,omitempty"` LensInfo string `json:"lensinfo,omitempty"` LensModel string `json:"lensmodel,omitempty"` CameraMake string `json:"cameramake,omitempty"` CameraModel string `json:"cameramodel,omitempty"` OriginalCameraMake string `json:"originalcameramake,omitempty"` OriginalCameraModel string `json:"originalcameramodel,omitempty"` // For arrays - see here for mappings & searching: http://stackoverflow.com/questions/26258292/querystring-search-on-array-elements-in-elastic-search Keywords []string `json:"keywords,omitempty"` // Auto-classified Tags *[]string `json:"tags,omitempty"` // Location Location *GeoPoint `json:"location,omitempty"` // Placename, from the reverse coding of the location LocationCountryName string `json:"countryname,omitempty"` LocationCountryCode string `json:"countrycode,omitempty"` LocationStateName string `json:"statename,omitempty"` LocationCityName string `json:"cityname,omitempty"` LocationSiteName string `json:"sitename,omitempty"` LocationPlaceName string `json:"placename,omitempty"` LocationHierarchicalName string `json:"hierarchicalname,omitempty"` LocationDisplayName string `json:"displayname,omitempty"` CachedLocationDistanceMeters int `json:"cachedlocationdistancemeters,omitempty"` // # of meters away from stored location the placename came from (due to using caching server) // Date related fields DateTime time.Time `json:"datetime"` // 2009-06-15T13:45:30.0000000-07:00 'round trip pattern' Date string `json:"date"` // yyyyMMdd - for aggregating by date DayName string `json:"dayname"` // (Wed, Wednesday) MonthName string `json:"monthname"` // (Apr, April) DayOfYear int `json:"dayofyear"` // Index of the day in the year, to help with byday searches (1-366; Jan/1 = 1, Feb/29 =60, Mar/1 = 61) Warnings []string `json:"warnings,omitempty"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.