commit c2504f251985a9ddb51a081dd78323699982237a Author: tebarius Date: Tue Oct 31 20:15:54 2023 +0100 Initial commit 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 0000000..963a75d Binary files /dev/null and b/Flask-QR.zip differ diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e69de29 diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..a4963b6 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,9 @@ + + + + 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 + + + + +