#pragma once #include #include #include #include #include namespace config { inline std::string get_value(const std::string& source) { std::string ret = source; try { std::ifstream config_file("/home/archivist/.rigidparadise/rp.cfg"); if(!config_file.good()) { std::cerr << "Unable to read configuration"<1 && str[0] != '#') { auto end = std::find_if(str.begin(), str.end(), isspace); size_t pos = end-str.begin(); std::string_view name{str.data(), pos}; if(name == source) { ret = std::string{end+1, str.end()}; } } } } catch(...) {} return ret; } }