Fixed bug in statistics filename generation, statistics writing

This commit is contained in:
tastytea 2018-03-15 19:02:27 +01:00
parent 0cf85b120f
commit d23ca9c198
Signed by: tastytea
GPG Key ID: 59346E0EA35C67E5
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.7)
project (mastobotmon
VERSION 0.3.0
VERSION 0.3.1
LANGUAGES CXX)
include(GNUInstallDirs)

View File

@ -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(