Fully converted to using the lel-guecs library externally now.

This commit is contained in:
Zed A. Shaw 2025-05-13 02:48:39 -04:00
parent 7c90eb6da1
commit 74a8599977
30 changed files with 139 additions and 1194 deletions

View file

@ -5,8 +5,10 @@
using nlohmann::json;
using fmt::format;
std::filesystem::path Config::BASE_DIR{"."};
Config::Config(const std::string src_path) : $src_path(src_path) {
std::ifstream infile($src_path);
std::ifstream infile(Config::path_to($src_path));
$config = json::parse(infile);
}
@ -33,3 +35,11 @@ std::vector<std::string> Config::keys() {
return the_fucking_keys;
}
void Config::set_base_dir(const char *optarg) {
Config::BASE_DIR.assign(optarg);
}
std::filesystem::path Config::path_to(const std::string& path) {
return Config::BASE_DIR / path;
}