From c2504f251985a9ddb51a081dd78323699982237a Mon Sep 17 00:00:00 2001 From: tebarius Date: Tue, 31 Oct 2023 20:15:54 +0100 Subject: [PATCH] Initial commit --- .idea/dbnavigator.xml | 402 +++++++++++++++++++ .idea/inspectionProfiles/Project_Default.xml | 14 + .idea/misc.xml | 6 + .idea/modules.xml | 8 + .idea/runConfigurations/Dockerfile_local.xml | 20 + .idea/vcs.xml | 6 + .idea/workspace.xml | 39 ++ Docker-Flask-QR.iml | 9 + Dockerfile | 4 + Dockerfile-RasPi | 16 + Flask-QR.py | 20 + Flask-QR.zip | Bin 0 -> 1466 bytes requirements.txt | 0 templates/index.html | 9 + templates/qr.html | 9 + 15 files changed, 562 insertions(+) create mode 100644 .idea/dbnavigator.xml create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/runConfigurations/Dockerfile_local.xml create mode 100644 .idea/vcs.xml create mode 100644 .idea/workspace.xml create mode 100644 Docker-Flask-QR.iml create mode 100644 Dockerfile create mode 100644 Dockerfile-RasPi create mode 100644 Flask-QR.py create mode 100644 Flask-QR.zip create mode 100644 requirements.txt create mode 100644 templates/index.html create mode 100644 templates/qr.html diff --git a/.idea/dbnavigator.xml b/.idea/dbnavigator.xml new file mode 100644 index 0000000..a9cfe74 --- /dev/null +++ b/.idea/dbnavigator.xml @@ -0,0 +1,402 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..930c017 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,14 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..639900d --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..cca61d8 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations/Dockerfile_local.xml b/.idea/runConfigurations/Dockerfile_local.xml new file mode 100644 index 0000000..bcb473a --- /dev/null +++ b/.idea/runConfigurations/Dockerfile_local.xml @@ -0,0 +1,20 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..743a99b --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + 1698755716250 + + + + \ No newline at end of file diff --git a/Docker-Flask-QR.iml b/Docker-Flask-QR.iml new file mode 100644 index 0000000..55d8595 --- /dev/null +++ b/Docker-Flask-QR.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b746629 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM ubuntu:latest +LABEL authors="tebarius" + +ENTRYPOINT ["top", "-b"] \ No newline at end of file diff --git a/Dockerfile-RasPi b/Dockerfile-RasPi new file mode 100644 index 0000000..b8c7a0d --- /dev/null +++ b/Dockerfile-RasPi @@ -0,0 +1,16 @@ +FROM python:3.9.18-slim + +LABEL authors="tebarius" +LABEL version="1.0" +LABEL description="Simple QR-Code-Generator-Server" + +WORKDIR /app + +COPY ./templates ./Flask-QR.py ./requirements.txt /app/ + +RUN pip install --upgrade pip +RUN pip install --trusted-host pypi.python.org -r requirements.txt + +EXPOSE 80 + +CMD ["python", "Flask-QR.py"] \ No newline at end of file diff --git a/Flask-QR.py b/Flask-QR.py new file mode 100644 index 0000000..e09f144 --- /dev/null +++ b/Flask-QR.py @@ -0,0 +1,20 @@ +from flask import Flask, render_template, request +from flask_qrcode import QRcode + +app = Flask(__name__) +QRcode(app) + + +@app.route("/") +def index(): + return render_template('index.html') + + +@app.route("/qr.html") +def makeqr(): + data = request.args.get('qr') + return render_template('qr.html', data=data) + + +if __name__ == "__main__": + app.run(host='0.0.0.0', port=80) diff --git a/Flask-QR.zip b/Flask-QR.zip new file mode 100644 index 0000000000000000000000000000000000000000..963a75d24b285fc7b34e486d2ab68198a403604b GIT binary patch literal 1466 zcmWIWW@Zs#U|`^2=2<_GpzVF* z9_N{sOW2R49O&lYoww&Tx5?U-XG|u?1+DD)^)1XyP;mFc>AzO*iz+k!Y7y}Fl~eCS zu9uU~8{T<(lh5f%IZv;(qDr-++YT%4lS|nHmrKV;+$fW^DJ|Qf^Zf1S)6qEw=cBsh zZbcT@xju5WXW$e*Y4GbxwC)BfM|)g)W`^68YSUu|a7 zbYHApdg@Z<3cnMp-gsvGe-?Z2X=2-pml2s_OfdQMu z#J~Uwa)i3fyp+@my^NCFoZ6t1euoVN_9}nmZ=SegX{PqUg{6lUhI~1uq;lk9=kk@I z`UktOe0#m|@)9kM4gATK_l%6q_EuFy?WwiVPkcO8M_)gqOJQan*P)3e<|it81jN4{ z^45uu+uZtahV3G^(|b0Wycgn}`@JAaa-V;pDdY3+LfnrEpBt;WE=~_v{4L{oz{aZE z5yB?tvy^-19yC=tR-J5l>x_|J)9iyU#IDY9c|3pLYR^v@|2KNrF4=X9B}RI6!__#6 z*a`mDUUw($Kbi6(dJ~tbOIgxfj_k#?&yFyr8@zp0oz6FBqEJgyorhqz^p)=>?@hd- zZaRj%Fsu0Rd)s%l1v3vVZhmll#ue@&bF~FG{1)Z?S*9@g<&Tia)bpyVAMCxjcbRMZ zyeZxbXJ@Q^DDcLY!|UAZTpyW$%YQolPkrmO^oZr$P(IWD#}-veW!Uh{es*~C^S|xC zm=HlfwJkop&&ak>8W{9Uz@QgI3Hrh!aJWwmwDkvu``w8@_`{VqE)AR*5v1?W-$I;GB%L*k!UPxr}EnRg_ z`qSRao=?{<=UFFUc*QnzNy`+o+UW}`sRblpXa;2l~ten^B7MapO&F_ zwWoe=lF>nO>CWAY;^Wf-l2{r)5N*mnOa@$@oO1-v!}LRGI;E= zEGtC*L&X9UxnJS|-i%E4-~@}Uj8K6leFZ3uRAO*3Km-{XBp6;8HK~g6+yX`cDnJ;H zEib_g7XWH91?olQ7-X~WdhYEJ#%ngV{0B2z0cdtCirI+Vh-}MQCBn8~CN*SRZU7S> g!UxcVhirw4g0Q;~R*$f + + + QR-Code-Generator + + + + + diff --git a/templates/qr.html b/templates/qr.html new file mode 100644 index 0000000..22f2621 --- /dev/null +++ b/templates/qr.html @@ -0,0 +1,9 @@ + + + + QR-Code-Generator + + + + +