Compare commits
No commits in common. "272cf69de70b0ce524d998fd11b5dfccda260121" and "d0154c4a40b9435c06f5a81455581b3a24e1bc0b" have entirely different histories.
272cf69de7
...
d0154c4a40
|
@ -1,7 +0,0 @@
|
||||||
Gemini scripts
|
|
||||||
==============
|
|
||||||
|
|
||||||
My personal collection of CGI scripts, running at `gemini://dece.space:5691/`.
|
|
||||||
Check out `gemini://dece.space/dev/scripts.gmi` for explanations.
|
|
||||||
|
|
||||||
All scripts are licensed as WTFPLv2.
|
|
16
inbox
16
inbox
|
@ -1,16 +0,0 @@
|
||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
import requests
|
|
||||||
|
|
||||||
import smolcgi
|
|
||||||
|
|
||||||
smolcgi.require_cool_client("This script is not publicly available, sorry!")
|
|
||||||
|
|
||||||
if not smolcgi.query_string_dec:
|
|
||||||
smolcgi.require_input("What's the matter?")
|
|
||||||
|
|
||||||
data = {"content": smolcgi.query_string_dec}
|
|
||||||
requests.post("http://127.0.0.1:28149", data=data)
|
|
||||||
|
|
||||||
smolcgi.header(20, "text/plain")
|
|
||||||
print("Input saved!")
|
|
4
lists
4
lists
|
@ -8,6 +8,10 @@ from pathlib import Path
|
||||||
import smolcgi as scgi
|
import smolcgi as scgi
|
||||||
scgi.require_client_cert()
|
scgi.require_client_cert()
|
||||||
|
|
||||||
|
STORAGE_PATH = Path("/home/gemini/storage/lists")
|
||||||
|
if not STORAGE_PATH.exists():
|
||||||
|
STORAGE_PATH.mkdir(parents=True)
|
||||||
|
|
||||||
ALLOWED_LIST_NAME_CHARS = string.ascii_lowercase + string.digits + "_"
|
ALLOWED_LIST_NAME_CHARS = string.ascii_lowercase + string.digits + "_"
|
||||||
|
|
||||||
|
|
||||||
|
|
Reference in a new issue