config parsing works with persistance

This commit is contained in:
venus
2026-04-06 15:19:11 -05:00
parent a74553bd88
commit f0d2f18364
2 changed files with 4 additions and 3 deletions

View File

@@ -18,4 +18,5 @@ ctf = "ctf.main:main"
[tool.hatch.build.targets.wheel]
packages = ["src/ctf"]
[tool.pyright]
extraPaths = ["src"]

View File

@@ -7,12 +7,12 @@ from pathlib import Path
from platformdirs import user_config_dir
from platformdirs import user_data_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():
# 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"
if not CONFIG_FILE.exists():
print("nothing in config, relying on default opts")
#this is where to declare default vals if not otherwise specified