last changes

This commit is contained in:
nglk 2023-01-15 12:13:14 +01:00
parent 6ad47b70a2
commit 3f22a2ecd7
3 changed files with 4 additions and 3 deletions

Binary file not shown.

3
app.py
View File

@ -40,7 +40,8 @@ def transform():
print(content["hocr"]) print(content["hocr"])
urllib.request.urlretrieve(content["pdf"], "static/pdf/input.pdf") urllib.request.urlretrieve(content["pdf"], "static/pdf/input.pdf")
hocr = subprocess.call("pdftotree static/pdf/input.pdf -o static/hocr/gynaikoktonia.hocr", shell=True) # the outcome of this hocr doesnt write well on the pdf, its structure doesn't fit
# hocr = subprocess.call("pdftotree static/pdf/input.pdf -o static/hocr/gynaikoktonia.hocr", shell=True)
result = subprocess.call("python3 hocrtransformpdf.py -i static/images/blank.png static/hocr/gynaikoktonia.hocr static/pdf/result.pdf", shell=True) result = subprocess.call("python3 hocrtransformpdf.py -i static/images/blank.png static/hocr/gynaikoktonia.hocr static/pdf/result.pdf", shell=True)

View File

@ -18,8 +18,8 @@
<button id="button3" onclick="readme()">ΔΙΑΒΑΣΕΜΕ.txt</button> <button id="button3" onclick="readme()">ΔΙΑΒΑΣΕΜΕ.txt</button>
<button id="button5" onclick="decode()">ΠΡΟΒΟΛΗ ΠΟΙΝΙΚΟΥ ΚΩΔΙΚΑ <img src="{{url_for('static', filename='images/closed.gif')}}"></button> <button id="button5" onclick="decode()">ΠΡΟΒΟΛΗ ΠΟΙΝΙΚΟΥ ΚΩΔΙΚΑ <img src="{{url_for('static', filename='images/closed.gif')}}"></button>
<button id="button2" onclick="copy()"> ΑΝΤΙΓΡΑΦΗ ΚΩΔΙΚΑ</button> <button id="button2" onclick="copy()"> ΑΠΟ-CODE-ΠΟΙΗΣΗ</button>
<button id="button1" onclick="transform()">ΜΕΤΑΛΛΑΓΜΕΝΟΣ ΚΩΔΙΚΑΣ</button> <button id="button1" onclick="transform()">ΜΕΤΑLUCKΤΡΙΑ</button>
<button id="button4" onclick="window.open('{{url_for('static', filename='pdf/ΣΧΕΔΙΟ_ΜΕΤΑΛΛΑΓΜΕΝΟΥΟΙΝΙΚΟΥ_ΚΩΔΙΚΑ_01.pdf')}}');">ΚΑΤΕΒΑΣΕ ΜΕΤΑΛΛΑΓΜΕΝΟ ΚΩΔΙΚΑ <img src="{{url_for('static', filename='images/open.gif')}}"> </button> <button id="button4" onclick="window.open('{{url_for('static', filename='pdf/ΣΧΕΔΙΟ_ΜΕΤΑΛΛΑΓΜΕΝΟΥΟΙΝΙΚΟΥ_ΚΩΔΙΚΑ_01.pdf')}}');">ΚΑΤΕΒΑΣΕ ΜΕΤΑΛΛΑΓΜΕΝΟ ΚΩΔΙΚΑ <img src="{{url_for('static', filename='images/open.gif')}}"> </button>
</td> </td>