Up to speedy speed boi

This commit is contained in:
benjamyn committed 2023-10-08 15:46:30 +11:00
1 parent b25cd86314
commit 2fc916e67d
10 files changed
+675 -48

No files matched your search

View File
Whitespace-only changes.
+16
View File
@@ -0,0 +1,16 @@
from os.path import abspath
from pathlib import Path
from os import environ
BASEDIR = abspath("")
env_path = Path(f"{BASEDIR}/.env")
def load_env():
if env_path.exists():
with open(env_path, "r") as f:
for line in f.readlines():
var_name, var_data = line.split("=", 1)
print(f"creating key {var_name} with data {var_data}")
environ[var_name] = var_data.strip()
+9
View File
@@ -0,0 +1,9 @@
async def image_block(url, title=""):
return [
{
"type": "image",
"title": {"type": "plain_text", "text": title},
"image_url": url,
"alt_text": "foo",
}
]