remove closings of Direkte Aktion and GG/BO feeds

This commit is contained in:
tastytea 2018-02-18 16:39:39 +01:00
parent 84f5503954
commit 4044e33c6c
Signed by: tastytea
GPG Key ID: 59346E0EA35C67E5
2 changed files with 8 additions and 2 deletions

View File

@ -2,7 +2,7 @@ cmake_minimum_required (VERSION 3.7)
include(GNUInstallDirs)
project (mastorss
VERSION 0.2.4
VERSION 0.2.5
LANGUAGES CXX
)

View File

@ -96,15 +96,21 @@ std::vector<string> parse_website(const string &profile, const string &xml)
std::regex recdata2("\\]\\]>");
std::regex restrip("<[^>]*>");
std::regex reindyfuckup("\\/\\* Style Definitions \\*\\/[.[:space:]]*$");
// Direkte Action closing
std::regex redaclosing("Der Beitrag .* erschien zuerst auf Direkte Aktion.");
// GG/BO closing
std::regex reggboclosing("Die von den einzelnen AutorInnen .* jeweiligen Text kenntlich gemacht ist.");
str = std::regex_replace(str, relt, "<");
str = std::regex_replace(str, regt, ">");
str = std::regex_replace(str, std::regex("[\\n\\r]+"), "\n"); // remove excess newlines
str = std::regex_replace(str, reparagraph, "\n\n");
str = std::regex_replace(str, recdata1, "");
str = std::regex_replace(str, recdata2, "");
str = std::regex_replace(str, restrip, "");
str = std::regex_replace(str, reindyfuckup, "");
str = std::regex_replace(str, redaclosing, "");
str = std::regex_replace(str, reggboclosing, "");
str = std::regex_replace(str, std::regex("[\\n\\r]{3,}"), "\n"); // remove excess newlines
for (const string &hashtag : watchwords)
{