Archived
Up to speedy speed boi
This commit is contained in:
1 parent
b25cd86314
commit
2fc916e67d
10 files changed
+675
-48
No files matched your search
Whitespace-only changes.
@@ -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()
|
||||
@@ -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",
|
||||
}
|
||||
]
|
||||
Reference in new issue
Block a user