Method Summary |
|
__init__(self,
env)
|
|
addImg (self,
fname)
TODO4: check if image path already in db returns -1 on error or newid
on success |
|
checkNewFiles(self)
|
|
checkSanity(self)
|
|
delImg(self,
id)
|
|
extractEXIF (self,
fid)
hook for exif library. |
|
extractIPTC (self,
fid)
hook for iptc PIL library. |
|
getImgCount(self)
|
|
getImgData(self,
id)
|
|
getImgDBStatus(self)
|
|
getImgPath(self,
id)
|
|
getImgThumbData(self,
id)
|
|
getPopularity (self,
id)
return at most nres popular image ids |
|
getRandomID(self)
|
|
getRandomIDs (self,
n)
returns UP TO n random ids. |
|
getThumbPath(self,
id)
|
|
hasID(self,
id)
|
|
maintain (self)
called from time to time to update cached sorted data |
|
onFinishedAdd (self,
idList,
newKey)
called when add job is done. |
|
open (self)
init c++ module db |
|
queryKeyword (self,
key,
nres)
return at most nres image ids with this key. |
|
queryMostPopular (self,
nres)
return at most nres popular image ids |
|
queryRandom(self,
count)
|
|
regenThumbs (self,
force)
#TODO3: finish - regenerate missing thumbnails. |
|
setImageKeyword(self,
id,
key)
|
|
shutdown(self)
|
|
sync (self,
reopen)
save image database to disk. |
Inherited from ImgDB |
|
addDir (self,
dirn,
recurse,
callback)
this function should be called by UI to add files. |
|
addFiles (self,
files,
status,
callback)
this function is called recusively through reactor.callLater status is
a list of values to be passed through calls: [number_of_added,
number_of_rejected] files is the list of files that still has to be
added |
|
calcSig (self,
img)
|
|
delDir (self,
dirId)
|
|
generateImageID (self)
need to return something unique |
|
getSig (self,
id)
|
|
getThumbName (self,
fname)
return the thumbnail full path for the image given by fname (fname is
full path) |
|
queryId (self,
id,
numres)
|
list
|
querySig (self,
sig,
numres,
thres)
query for similar images. |