Removed last vestiges of old name, removed unnecessary imports, added manifest.json

This commit is contained in:
Ignacio Rivero 2025-06-22 01:53:37 -03:00
parent f4d4b423cc
commit df22626c59
4 changed files with 16 additions and 2 deletions

17
app.py
View File

@ -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)

BIN
static/icon512_maskable.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
static/icon512_rounded.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

1
static/manifest.json Normal file
View File

@ -0,0 +1 @@
{"theme_color":"#22282c","background_color":"#22282c","icons":[{"purpose":"maskable","sizes":"512x512","src":"icon512_maskable.png","type":"image/png"},{"purpose":"any","sizes":"512x512","src":"icon512_rounded.png","type":"image/png"}],"orientation":"any","display":"standalone","dir":"auto","lang":"es-UY","start_url":"https://catnote.netpaws.cc","scope":"https://catnote.netpaws.cc","name":"CatNote","short_name":"CatNote","id":"cc.netpaws.catnote"}