Exemple #1
0
            else:
                next_link=self.list_img[0]+'.html'
                next_img='../'+self.dir_thumb+'/'+self.list_img[0]

            # info
            image=os.path.join(self.path_size,self.list_img[idx])
            im = Image.open(image)
            img_dim = " %s x %s " % im.size
            #exif
            self.__build_page(self.title,self.list_img[idx],'../'+self.dir_size+'/'+self.list_img[idx],
                              pre_link,next_link,
                              idx+1,num_img,'../'+constants.NAME_INDEX+".html",
                              pre_img,next_img,
                              comments,img_dim,time,os.path.join(self.path_store_html,self.list_img[idx]+'.html'))
            idx +=1
        #copy image from template dir
        self.lista.copy_img(self.tpl_source,self.path_store_html)


if __name__ == '__main__':
    
    p = constants.IMAGE_SIZES
    thumb = resize.mthumb('paesaggi','prova/thumb',p[0])
    thumb.create()
    thumb = resize.mthumb('paesaggi','prova/size-640x480',p[1])
    thumb.create()
    p = html_gallery.html_gallery('prova/thumb','html',5,4,'../template/Classic/index.html','../template/Classic/thumbnail.html','pippunga titolo')
    p.build()
    b = html_slide('prova/size-640x480','prova/html','thumb','../template/Classic/image.html','pippunga titolo');
    b.build()
Exemple #2
0
                while start <= len(self.list_img):
                    self.__build_page_thumb(self.list_img[start:stop], constants.NAME_INDEX + str(x) + ".html", menu)
                    start += self.row * self.col
                    stop += self.row * self.col
                    if x == "":
                        x = 1
                        x += 1

            # copy image from template dir
            self.lista.copy_img(self.tpl_source, self.path_dest)

        else:
            return 0


if __name__ == "__main__":

    p = constants.IMAGE_SIZES
    thumb = resize.mthumb("paesaggi", "prova/thumb", p[0])
    thumb.create()
    p = html_gallery(
        "prova/thumb",
        "resize-480x320",
        5,
        4,
        "../template/Classic/index.html",
        "../template/Classic/thumbnail.html",
        "pippunga titolo",
    )
    p.build()