예제 #1
0
 def __init__(self, folder, title=None, body=None, \
              htmldir='html', thumbdir='thumbnails', \
              extlist=jpgextlist, contentlist=[], \
              HTMLclass=HTMLImage, skipdirs=myskipdirs, \
              screensizedir='screensize', \
              skiplist=[], \
              bodyin=[], **kwargs):
    Image_Finder.__init__(self, folder, extlist=extlist, \
                          skipdirs=skipdirs, skiplist=skiplist, \
                          **kwargs)
    self.folder = folder
    self.header = thumbheader.replace('%TITLE%', str(title))
    self.extlist = extlist
    self.body = copy.copy(bodyin)
    self.contentlist = copy.copy(contentlist)
    #print('bodyin = '+str(bodyin))
    self.htmldir = htmldir
    self.thumbdir = thumbdir
    if title:
       self.body.insert(0,'<h1>'+title+'</h1>')
    if body:
       self.body.append(body+'<br>')
    self.tail = tail
    self.HTMLclass = HTMLclass
    self.screensizedir = screensizedir
예제 #2
0
 def __init__(self, folderpath, resizeclass=Thumbnail, \
              resizefolder='thumbnails', size=[300,200], \
              extlist=jpgextlist, skipdirs=myskipdirs, \
              skiplist=[]):
    Image_Finder.__init__(self, folderpath, extlist=extlist, \
                          skipdirs=skipdirs, skiplist=skiplist)
    self.folder = folderpath
    self.resizeclass = resizeclass
    self.resizefolder = resizefolder
    self.size = size
    self.kwargs = {'size':self.size,'thumbdir':self.resizefolder}