diff --git a/CMakeLists.txt b/CMakeLists.txt index 3477071..c849b41 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required (VERSION 3.7) include(GNUInstallDirs) project (rss2mastodon - VERSION 0.1.3 + VERSION 0.1.4 LANGUAGES CXX ) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wall") diff --git a/src/rss2mastodon.cpp b/src/rss2mastodon.cpp index 77ea201..056813f 100644 --- a/src/rss2mastodon.cpp +++ b/src/rss2mastodon.cpp @@ -45,7 +45,7 @@ void read_config(pt::ptree &config, const string &profile, string &instance, str // Read config file, get access token try { - pt::read_json(filepath + "config.json", config); + pt::read_json(filepath + "config-" + profile + ".json", config); instance = config.get(profile + ".instance", ""); access_token = config.get(profile + ".access_token", ""); feedurl = config.get(profile + ".feedurl", ""); @@ -81,7 +81,7 @@ void read_config(pt::ptree &config, const string &profile, string &instance, str } if (config_changed) { - pt::write_json(filepath + "config.json", config); + pt::write_json(filepath + "config-" + profile + ".json", config); } } @@ -190,7 +190,7 @@ int main(int argc, char *argv[]) { config.put(profile + ".last_entry", entries.front()); } - pt::write_json(filepath + "config.json", config); + pt::write_json(filepath + "config-" + profile + ".json", config); bool new_content = false; for (auto rit = entries.rbegin(); rit != entries.rend(); ++rit) diff --git a/src/rss2mastodon.hpp b/src/rss2mastodon.hpp index dea03df..3d808df 100644 --- a/src/rss2mastodon.hpp +++ b/src/rss2mastodon.hpp @@ -1,5 +1,5 @@ -#ifndef AFRINTICKER_HPP -#define AFRINTICKER_HPP +#ifndef RSS2MASTODON_HPP +#define RSS2MASTODON_HPP #include #include @@ -16,4 +16,4 @@ std::vector parse_website(const string &profile, const string &xml); const std::uint16_t http_get(const string &host, const string &path, string &answer, const string &useragent = ""); -#endif // AFRINTICKER_HPP +#endif // RSS2MASTODON_HPP