From 676b4d356df9de19656620a853d95c10b62eb9dd Mon Sep 17 00:00:00 2001 From: tastytea Date: Fri, 16 Mar 2018 11:28:53 +0100 Subject: [PATCH] Added URL to mentions --- CMakeLists.txt | 2 +- README.md | 2 +- src/mastobotmon.cpp | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 39f9a44..9ff2479 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required (VERSION 3.7) project (mastobotmon - VERSION 0.3.1 + VERSION 0.3.2 LANGUAGES CXX) include(GNUInstallDirs) diff --git a/README.md b/README.md index 1bc5586..a1a8eba 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ If you use a debug build, you get more verbose error messages. ## Mentions -Mentions are written to `data_dir/mentions_account.csv`. The format is: acct;created_at;content. +Mentions are written to `data_dir/mentions_account.csv`. The format is: acct;created_at;content;url. ## Statistics diff --git a/src/mastobotmon.cpp b/src/mastobotmon.cpp index e16d3ad..fb3c5e3 100644 --- a/src/mastobotmon.cpp +++ b/src/mastobotmon.cpp @@ -50,7 +50,8 @@ const bool write_mentions(const string &straccount, Json::Value &mentions) { output = mention["status"]["account"]["acct"].asString() + ';'; output += mention["status"]["created_at"].asString() + ';'; - output += mention["status"]["content"].asString() + '\n'; + output += mention["status"]["content"].asString() + ';'; + output += mention["status"]["url"].asString() + '\n'; output = std::regex_replace(output, restrip, ""); outfile.write(output.c_str(), output.length()); }