From d23ca9c1982473289b4d53fbda65e1c2c9126f47 Mon Sep 17 00:00:00 2001 From: tastytea Date: Thu, 15 Mar 2018 19:02:27 +0100 Subject: [PATCH] Fixed bug in statistics filename generation, statistics writing --- CMakeLists.txt | 2 +- src/mastobotmon.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0acb39b..39f9a44 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required (VERSION 3.7) project (mastobotmon - VERSION 0.3.0 + VERSION 0.3.1 LANGUAGES CXX) include(GNUInstallDirs) diff --git a/src/mastobotmon.cpp b/src/mastobotmon.cpp index da09143..e16d3ad 100644 --- a/src/mastobotmon.cpp +++ b/src/mastobotmon.cpp @@ -80,7 +80,7 @@ const bool write_statistics(const string &straccount, Json::Value &account_json) ss << std::put_time(&now_tm, "%Y-%m-%dT%T"); output = ss.str() + ';'; output += account_json["statuses_count"].asString() + ';'; - output += account_json["followers_count"].asString() + ";\n"; + output += account_json["followers_count"].asString() + '\n'; outfile.write(output.c_str(), output.length()); outfile.close(); @@ -143,7 +143,7 @@ int main(int argc, char *argv[]) Json::Reader reader; reader.parse(answer, json); const string id = json["id"].asString(); - const string straccount = json["account"]["acct"].asString() + "@" + acc.get_instance(); + const string straccount = json["acct"].asString() + "@" + acc.get_instance(); write_statistics(straccount, json); Account::parametermap parameters(