aboutsummaryrefslogtreecommitdiffstats
path: root/web/utils.py
diff options
context:
space:
mode:
authorGuillaume Horel <guillaume.horel@gmail.com>2014-02-27 23:40:21 -0500
committerGuillaume Horel <guillaume.horel@gmail.com>2014-02-27 23:40:21 -0500
commit5b47c960ff350556fa4bc02e62ad1d2e62695765 (patch)
tree7dadbb34a686d0f82267b732d452e9ea4dae9fa3 /web/utils.py
parent3e343111fc525f093f8bd98707000eb44f08a97f (diff)
downloadocr-layer-curation-5b47c960ff350556fa4bc02e62ad1d2e62695765.tar.gz
add function to return image from a book
Diffstat (limited to 'web/utils.py')
-rw-r--r--web/utils.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/web/utils.py b/web/utils.py
index 7a6bf1a..3db0296 100644
--- a/web/utils.py
+++ b/web/utils.py
@@ -3,9 +3,10 @@ import sys
def gen_html(book, page_number):
- book = "../Bloy_-_Le_Sang_du_pauvre,_Stock,_1932.djvu"
+ book = "../Villiers_de_L'Isle-Adam_-_Tribulat_Bonhomet,_1908.djvu"
d = parse_book(book, page=int(page_number), html=True)
- words, coords = d[0]
+ if d[0]:
+ words, coords = zip(*d[0])
return (list(enumerate(coords)), list(enumerate(words)))