init with some kind of working prototype
This commit is contained in:
commit
b5cb22822e
22 changed files with 1292 additions and 0 deletions
14
unwind/config.py
Normal file
14
unwind/config.py
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import os
|
||||
from pathlib import Path
|
||||
|
||||
import toml
|
||||
|
||||
cachedir = (
|
||||
Path(cachedir) if (cachedir := os.getenv("UNWIND_CACHEDIR", ".cache")) else None
|
||||
)
|
||||
debug = os.getenv("DEBUG") == "1"
|
||||
loglevel = os.getenv("UNWIND_LOGLEVEL") or ("DEBUG" if debug else "INFO")
|
||||
storage_path = os.getenv("UNWIND_STORAGE", "./data/db.sqlite")
|
||||
config_path = os.getenv("UNWIND_CONFIG", "./data/config.toml")
|
||||
|
||||
imdb = toml.load(config_path)["imdb"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue