Compare commits

..

3 commits

Author SHA1 Message Date
dece 272cf69de7 readme 2022-04-04 18:48:52 +02:00
dece 558e4a4f23 inbox 2022-01-24 18:07:40 +01:00
dece 2a2c834886 lists: do not create user dir, done by smolcgi 2022-01-24 18:06:57 +01:00
3 changed files with 23 additions and 4 deletions

7
README.md Normal file
View file

@ -0,0 +1,7 @@
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 Executable file
View file

@ -0,0 +1,16 @@
#!/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
View file

@ -8,10 +8,6 @@ from pathlib import Path
import smolcgi as scgi
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 + "_"