small fixes, reduced watchwords to an example

This commit is contained in:
tastytea 2018-01-26 17:00:06 +01:00
parent 0b1c436bbb
commit 992ebe0ec4
Signed by: tastytea
GPG Key ID: 59346E0EA35C67E5
3 changed files with 10 additions and 55 deletions

View File

@ -2,7 +2,7 @@ cmake_minimum_required (VERSION 3.7)
include(GNUInstallDirs) include(GNUInstallDirs)
project (rss2mastodon project (rss2mastodon
VERSION 0.1.1 VERSION 0.1.2
LANGUAGES CXX LANGUAGES CXX
) )
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wall") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wall")

View File

@ -22,6 +22,8 @@
#include <random> #include <random>
#include <regex> #include <regex>
#include <sstream> #include <sstream>
#include <thread>
#include <chrono>
#include <boost/property_tree/ptree.hpp> #include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/json_parser.hpp> #include <boost/property_tree/json_parser.hpp>
#include <boost/property_tree/xml_parser.hpp> #include <boost/property_tree/xml_parser.hpp>
@ -96,6 +98,7 @@ std::vector<string> parse_website(const string &profile, const string &xml)
{ {
// most likely file not found // most likely file not found
std::cerr << "ERROR: " << filepath << "watchwords.json not found or not readable.\n"; std::cerr << "ERROR: " << filepath << "watchwords.json not found or not readable.\n";
std::cerr << e.what() << '\n';
return {}; return {};
} }
@ -214,6 +217,8 @@ int main(int argc, char *argv[])
std::cerr << "Error code: " << ret << '\n'; std::cerr << "Error code: " << ret << '\n';
return ret; return ret;
} }
std::this_thread::sleep_for(std::chrono::seconds(2));
} }
return 0; return 0;

View File

@ -21,63 +21,13 @@
"Erfurt" "Erfurt"
] ]
}, },
"anfdeutsch": "example":
{ {
"tags": "tags":
[ [
"Syrien", "banana",
"Efrîn", "apple",
"Afrin", "mastodon"
"Kobanî",
"Kobanê",
"Şehba",
"Cizîrê",
"Heleb",
"Aleppo",
"Amûdê",
"Amûdê",
"Basûtê",
"Basuta",
"Şam",
"Damaskus",
"Dirbêsî",
"Hesîçe",
"Jindrêsê",
"Cindirêsê",
"Qitmê",
"Tirbesipî",
"Raco",
"Qamişlo",
"Keferjenê",
"Bilbilê",
"Bilbile",
"Minbic",
"Badina",
"Mebata",
"Rojava",
"Kilis",
ırnak",
"Şirnex",
"Silêmanî",
"Erbil",
"Hewlêr",
"Arbil",
"Köln",
"Basel",
"QSD",
"YPJ",
"YPG",
"Türkei",
"KCK",
"HDP",
"PKK",
"Gabriel",
"Erdoğan",
"Putin",
"Assad",
"Öcalan",
"NATO",
"DIK"
] ]
} }
} }