aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorGuillaume Horel <guillaume.horel@serenitascapital.com>2014-02-27 13:58:22 -0500
committerGuillaume Horel <guillaume.horel@serenitascapital.com>2014-02-27 13:58:22 -0500
commit7d51499ee70c2795ba897981e7ce4f69ce61dd28 (patch)
tree8581dce985d102a305b555435dc9ee25ae36b44c /web
parentf96752448a537bd6a3378a83ab0e8476653ec59c (diff)
downloadocr-layer-curation-7d51499ee70c2795ba897981e7ce4f69ce61dd28.tar.gz
generate more useful html coordinatates
Diffstat (limited to 'web')
-rw-r--r--web/utils.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/web/utils.py b/web/utils.py
index 5cc53cf..7a6bf1a 100644
--- a/web/utils.py
+++ b/web/utils.py
@@ -3,16 +3,11 @@ import sys
def gen_html(book, page_number):
- book = "../Villiers_de_L\'Isle-Adam_-_Tribulat_Bonhomet,_1908.djvu"
+ book = "../Bloy_-_Le_Sang_du_pauvre,_Stock,_1932.djvu"
d = parse_book(book, page=int(page_number), html=True)
words, coords = d[0]
- def get_areas():
- for i, coord in enumerate(coords):
- coord_str = ",".join(map(str, coord))
- yield i, coord_str
-
- return list(get_areas()), list(enumerate(words))
+ return (list(enumerate(coords)), list(enumerate(words)))
if __name__ == "__main__":
gen_html(*sys.argv[1:3])