From bf74cd2294598c3dc1d73edd74ca88c87b7d6cd6 Mon Sep 17 00:00:00 2001 From: Guillaume Horel Date: Sat, 1 Mar 2014 15:26:45 -0500 Subject: Preliminary support for corrected text * It's slow, need to figure out how to load it in the background maybe * The bouding boxes could be improved --- web/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'web/main.py') diff --git a/web/main.py b/web/main.py index 582d33c..206eb86 100644 --- a/web/main.py +++ b/web/main.py @@ -3,7 +3,7 @@ from tornado.web import RequestHandler, Application import tornado.ioloop from settings import settings import utils -from parsedjvutext import image_from_book +from djvu_utils import image_from_book import io class MainHandler(RequestHandler): @@ -16,7 +16,7 @@ class MainHandler(RequestHandler): class ImageHandler(RequestHandler): def get(self, page_number): - im = image_from_book(self.settings["book"], int(page_number)) + im = image_from_book("../" + self.settings["book"], int(page_number)) self.set_header('Content-Type', 'image/jpg') img_buff = io.BytesIO() im.save(img_buff, format="JPEG") -- cgit v1.2.3-70-g09d2