def get_metadata(self, ids): gallery = Gallery(ids["gallery"]) metadata = pyexiv2.ImageMetadata(gallery.get_disk_path( dir=ids["collection"], file=ids["image"] )) metadata.read() return metadata
def simple_nav(self, gallery_name, gallery_split): collection_name = gallery_split[3] gallery = Gallery(gallery_name) if len(gallery_split) == 4: # len(gallery_split[4]) == 0: current_image = gallery.get_next_image(collection_name) else: current_image = gallery_split[4] return render.simple( gallery_name, collection_name, gallery.get_disk_path(collection_name, current_image, for_disk=False), gallery.get_previous_image(collection_name, current_image), gallery.get_next_image(collection_name, current_image) )
def GET(self): gallery = Gallery("") return render.home(gallery.get_galleries())
def GET(self, gallery_name, collection): gallery = Gallery(gallery_name) return render.collection(gallery.get_images(collection))
def collage(self, gallery_name, gallery_split): collection_name = gallery_split[3] gallery = Gallery(gallery_name) return render.collage(gallery_name, gallery.get_images(collection_name), collection_name)