diff options
| author | Physick <96335032+DegustatorPonos@users.noreply.github.com> | 2026-05-10 19:55:02 +0500 |
|---|---|---|
| committer | Physick <96335032+DegustatorPonos@users.noreply.github.com> | 2026-05-10 19:55:02 +0500 |
| commit | 92bee957b4face63285933f48f6d6e04ac064ca8 (patch) | |
| tree | 00f8b7ae6033165d767c1e371d3a8ce880766e86 /src/main.cpp | |
| parent | e695a65df9d5a8ee7d5af705c4789e44fbcc0b60 (diff) | |
Time sorting
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index b7ff89a..cabe6dd 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -24,10 +24,14 @@ int main() { return 1; } XML_leaf configParsed(config); + + auto span = std::stoi(configParsed.GetChild("lastminutes").GetValue()); + std::cout << "News of the last " << span << " minutes:" << std::endl; + auto sources = configParsed.GetChildren("source"); for (auto src : sources) { - std::cout << "URL: " << src.GetValue() << std::endl; - RSS(src.GetValue()).print(); + // std::cout << "URL: " << src.GetValue() << std::endl; + RSS(src.GetValue()).print_latest(span); } } catch (char *ex) { std::cout << "failed to read config file: " << ex << std::endl; |
