Browse Source

last changes

master
nglk 1 year ago
parent
commit
3f22a2ecd7
  1. BIN
      __pycache__/app.cpython-37.pyc
  2. 3
      app.py
  3. 4
      templates/results.html

BIN
__pycache__/app.cpython-37.pyc

Binary file not shown.

3
app.py

@ -40,7 +40,8 @@ def transform():
print(content["hocr"])
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)

4
templates/results.html

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

Loading…
Cancel
Save