config works
This commit is contained in:
13
src/ctf/utils.py
Normal file
13
src/ctf/utils.py
Normal 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)
|
||||
Reference in New Issue
Block a user