2020-12-28 23:17:30 +01:00
|
|
|
#ifndef PAGED_ARTICLE_H
|
|
|
|
#define PAGED_ARTICLE_H
|
|
|
|
|
|
|
|
#include <map>
|
2021-11-01 19:53:35 +01:00
|
|
|
#include "core/containers/vector.h"
|
|
|
|
#include "core/string.h"
|
2020-12-28 23:17:30 +01:00
|
|
|
|
2021-01-06 03:57:18 +01:00
|
|
|
#include "core/file_cache.h"
|
2022-01-08 12:53:50 +01:00
|
|
|
#include "core/http/web_node.h"
|
2020-12-28 23:17:30 +01:00
|
|
|
|
2021-05-27 17:37:23 +02:00
|
|
|
#include "core/http/request.h"
|
2022-02-04 20:36:09 +01:00
|
|
|
#include "paged_article_entry.h"
|
2020-12-28 23:17:30 +01:00
|
|
|
|
2022-01-08 12:53:50 +01:00
|
|
|
class PagedArticle : public WebNode {
|
|
|
|
RCPP_OBJECT(PagedArticle, WebNode);
|
2020-12-28 23:17:30 +01:00
|
|
|
|
|
|
|
public:
|
2022-01-08 12:53:50 +01:00
|
|
|
void handle_request_main(Request *request);
|
2020-12-28 23:17:30 +01:00
|
|
|
|
|
|
|
void load();
|
2022-02-04 20:36:09 +01:00
|
|
|
PagedArticleEntry *load_folder(const String &folder, const String &path);
|
2020-12-28 23:17:30 +01:00
|
|
|
void generate_summaries();
|
2022-02-04 20:36:09 +01:00
|
|
|
void generate_summary(PagedArticleEntry *article);
|
2020-12-28 23:17:30 +01:00
|
|
|
|
|
|
|
PagedArticle();
|
|
|
|
~PagedArticle();
|
|
|
|
|
2022-02-04 20:36:09 +01:00
|
|
|
std::map<String, PagedArticleEntry *> pages;
|
2021-11-01 19:53:35 +01:00
|
|
|
String folder;
|
|
|
|
String base_path;
|
2020-12-28 23:17:30 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|