Removed last vestiges of old name, removed unnecessary imports, added manifest.json
This commit is contained in:
17
app.py
17
app.py
@@ -1,7 +1,7 @@
|
||||
import io
|
||||
import tempfile
|
||||
import subprocess
|
||||
from flask import Flask, render_template_string, request, send_file, redirect, url_for, flash
|
||||
from flask import Flask, render_template_string, request, send_from_directory
|
||||
from PIL import Image, ImageDraw, ImageFont
|
||||
import re
|
||||
|
||||
@@ -21,7 +21,8 @@ BULLET_CHAR = "• "
|
||||
|
||||
HTML_FORM = '''
|
||||
<!doctype html>
|
||||
<title>Markdown Thermal Note</title>
|
||||
<title>CatPrint</title>
|
||||
<link rel="manifest" href="/static/manifest.json">
|
||||
<style>
|
||||
body {
|
||||
font-family: sans-serif;
|
||||
@@ -514,5 +515,17 @@ def index():
|
||||
return render_template_string(HTML_FORM, img=img_data, default_md=md,
|
||||
printed=printed, error=error)
|
||||
|
||||
@app.route('/manifest.json')
|
||||
def manifest():
|
||||
return send_from_directory('static', 'manifest.json')
|
||||
|
||||
@app.route('/icon512_maskable.png')
|
||||
def icon_maskable():
|
||||
return send_from_directory('static', 'icon512_maskable.png')
|
||||
|
||||
@app.route('/icon512_rounded.png')
|
||||
def icon_rounded():
|
||||
return send_from_directory('static', 'icon512_rounded.png')
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run(host="0.0.0.0", debug=True)
|
||||
|
||||
Reference in New Issue
Block a user