config works

This commit is contained in:
venus
2026-04-05 23:31:32 -05:00
parent 7e88b51db6
commit b208cc2ddb
3 changed files with 18 additions and 1 deletions

13
src/ctf/utils.py Normal file
View File

@@ -0,0 +1,13 @@
# src/ctf/utils.py
# basic utilities
import tomllib
from pathlib import Path
from platformdirs import user_config_dir
# Parse config file
CONFIG_DIR = Path(user_config_dir("ctf")) #config directory is $XDG_CONFIG_HOME/ctf/
CONFIG_DIR = Path("/home/venus/code/ctf/")
CONFIG_FILE = CONFIG_DIR / "config.toml"
def load_config():
print(CONFIG_FILE)