Browse Source

manouevring around the proxy pass errors, including the index file in the flask application now

master
televex 3 years ago
parent
commit
73b0f9310f
  1. 4
      print/start.py
  2. BIN
      print/static/televex-feb-2021.jpg
  3. 12
      print/templates/index.html
  4. 2
      print/tools/televex/televex.py

4
print/start.py

@ -45,6 +45,10 @@ def check():
if already_in_db == False:
televex.print_now(txt, lp=lp, type='rss')
@APP.route('/', methods=['GET'])
def index():
return flask.render_template('index.html')
@APP.route('/print/', methods=['GET', 'POST'])
def print():
txt = request.args.get('printing', '')

BIN
print/static/televex-feb-2021.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 KiB

12
print/templates/index.html

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset="utf-8" />
<title>TeleVex</title>
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='stylesheet.css')}}">
</head>
<body>
<h1>TeleVex</h1>
<img src="{{ url_for('static', filename='televex-feb-2021.jpg')}}" width="400px" height="auto">
</body>
</html>

2
print/tools/televex/televex.py

@ -10,7 +10,7 @@ def connect():
# Get the printer's USB initializing code with $ sudo lsbusb
try:
lp = printer.Usb(0x4b8,0xe15) # televex printer @ Varia
# lp = printer.Usb(0x4b8,0xe03) # printer @ poel
lp = printer.Usb(0x4b8,0xe03) # printer @ poel
except:
lp = None

Loading…
Cancel
Save