feat: Add download option for PGP public key
All checks were successful
Build Docker / BuildImage (push) Successful in 43s

This commit is contained in:
Nathan Woodburn 2024-09-30 16:19:49 +10:00
parent 9552df4b4e
commit 496205c6b4
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1
4 changed files with 91 additions and 1 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@ __pycache__/
.env .env
.vs/ .vs/
.venv/

77
data/nathanwoodburn.asc Normal file
View File

@ -0,0 +1,77 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
xsFNBGPp+YUBEADrOH051Panj+KMnVCvilPx4L4jSqOH/TwdQIpp3y2JSk5foysY
9/n3AbeUoKi5x+vKp9XNmIZjwSlUcTUo65kx39vlSiMRuRkRkdLGACc0pM8GCKtl
7s016bvX22h5w2jg1d4d5Aq7BUsoRgMlgNWkAhPKzwgR67VYfnLI2sRe2+9P0Aj4
venAZnk0XNHNmL70dHNvG9M9CK11kNGiG2Xqnb4vVTTyLD54i040JCK2xkAOk1PX
JIoIyBu2wAUz3rMczopJWrInDrMiZN56a0bqQQQt8lKf8dD6yNfb1LXJWfuxHlw4
Zjkz2D99zT9J++fRQhwJfye/1sgk069aKXyv1lg0N1cPulkP+7uD5389NKc2wA/b
rw0p2Rr7BnPpz4KlTGaOfU9KmxP1eQ3WpH/FMVLkxun4hNuEeca+/yAw6OCCqB/C
P5SagzDeKTjUdi2yo2KuhHon7U0G+xyCqK7j998H/SIh3T/wjxE8FHCTHH2VuuQ/
9xXMpkXqctCQy83th1YmWkqBDyLioYVs6DpjLb6BytRXajHqXhX94ZLcdxSwjbWh
Evse0PHpQZsDHs1cKCZTmGnH0VUhuPUHykYoNwDdimpLLVpGfkr7s+BgfZCQnSkc
kHIzmZFT3rTFSIsMFa3Kr8HRDqA6ezC5RT7/s5fa4vN0/Hh0eAthMuv4NQARAQAB
zSxOYXRoYW4gV29vZGJ1cm4gPGNvbnRhY3RAbmF0aGFuLndvb2RidXJuLmF1PsLB
dQQTAQgAKQUC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g
fy729x1j2mZgSrkCv7QwK9Mk9PJGb6YX9pyilr3S+AcYoZnSL0cVV+LAeJ5InjMo
22g094/qcVZmiH3CNz1OuknwnkDkwHareUmHbM9a3DGBJQ7SN55PRFIZccU/DrXG
NcEkSmfl/RJMNizolgRDz8S1XS0MZmG6/xrX7kxK2SfuXlxaDgMWoCAaxoil2MW2
BXxhwZ8GQayuZKJGdTc/iDzk6C7dkQCoBfdxDWGeY1yACfcbAiRA/u5gdpFg6+Wm
IUWwchpPHZmUozcuiPWQX5f3w7pzMMHYzov8otu5vsuPbnAuc1OcwSFXTb4FP98G
B7ORBWU/xvmMz5vqfcywY3bdr8938GJXs7MxqcXJJoMivUYzUGHSw4zf5tOxnltq
AFZjP2muCOBwDKDm8c3/Q3lqZkijIn/iiolSNhNHQZlbuP/57+1XMDBOrHYwhUFB
zcpFkUrFho23Gwia2Q3lkn129qbFW7J5dMVizAwvt3DnsTZYDl3KgIWQwgId4BMi
Rk2DJK5d65l1qg7f6w2pNaVG3i5Om+t7Z22UNuCJT/HG/cP6F9es0rAaNFXXxdRS
/G749MtEVVLiCbHNE4ZfWfXgAuiw9KIQaD/tCostZIEbJgwOePMXxXQWCR6V4yfA
i0GVXA==
=W9Zx
-----END PGP PUBLIC KEY BLOCK-----

View File

@ -42,6 +42,10 @@ restricted = ["ascii"]
redirects = { redirects = {
"contact":"/#contact" "contact":"/#contact"
} }
downloads = {
"pgp": "data/nathanwoodburn.asc"
}
sites = [] sites = []
if os.path.isfile("data/sites.json"): if os.path.isfile("data/sites.json"):
@ -789,6 +793,14 @@ def supersecretpath():
ascii_art_html = converter.convert(ascii_art) ascii_art_html = converter.convert(ascii_art)
return render_template("ascii.html", ascii_art=ascii_art_html) return render_template("ascii.html", ascii_art=ascii_art_html)
@app.route("/download/<path:path>")
def download(path):
# Check if file exists
if path in downloads:
path = downloads[path]
if os.path.isfile(path):
return send_file(path)
return render_template("404.html"), 404
@app.route("/<path:path>") @app.route("/<path:path>")
def catch_all(path: str): def catch_all(path: str):

File diff suppressed because one or more lines are too long