aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/static/css/style.css17
-rw-r--r--web/templates/layout.html2
-rw-r--r--web/utils.py8
3 files changed, 22 insertions, 5 deletions
diff --git a/web/static/css/style.css b/web/static/css/style.css
index 3005bc5..b293da8 100644
--- a/web/static/css/style.css
+++ b/web/static/css/style.css
@@ -11,6 +11,23 @@ span:hover {
margin-right: 1em;
}
+#text {
+ width: 460px;
+ float: left;
+}
+
+.pagetext p {
+ text-align: justify;
+ -moz-hyphens: auto;
+ margin: 0;
+ text-indent: 1.5em;
+}
+
+.pagetext {
+ padding: 3.5em 2em;
+ font-size: 18px;
+ line-height: 180%;
+
#texte-non-corrige {
margin-top:0cm;
width: 10cm;
diff --git a/web/templates/layout.html b/web/templates/layout.html
index ff4077d..2fef4d3 100644
--- a/web/templates/layout.html
+++ b/web/templates/layout.html
@@ -1,5 +1,5 @@
<!doctype html>
-<html lang="en">
+<html lang="fr">
<head>
<meta charset="utf-8">
<script src="static/js/jquery.js"></script>
diff --git a/web/utils.py b/web/utils.py
index 7e20858..e6f4309 100644
--- a/web/utils.py
+++ b/web/utils.py
@@ -1,14 +1,14 @@
import djvu_utils as du
import sys
import string_utils as su
-from wikisource import get_page
+from wikisource import get_page2
+
def gen_html(book, page_number):
doc = du.get_document("../" + book)
- page = doc.pages[int(page_number)-1]
+ page = doc.pages[int(page_number) - 1]
d = du.parse_page(page)
- corrected_text = get_page(book, int(page_number))
- corrected_words = su.simplify(corrected_text).split()
+ elem, corrected_text = get_page2(open("test.txt").read())
if d:
orig_words, orig_coords = zip(*d)
C = su.align(corrected_words, list(orig_words), list(orig_coords))