remove mustache
This commit is contained in:
@@ -26,7 +26,13 @@ typedef std::tuple<PostHeader, PostBody, Attachments> Post;
|
||||
// a thread (many posts in post order)
|
||||
typedef std::vector<Post> Thread;
|
||||
// a board page is many threads in bump order
|
||||
typedef std::vector<Thread> BoardPage;
|
||||
struct BoardPage
|
||||
{
|
||||
std::vector<Thread> threads = {};
|
||||
std::string name = "";
|
||||
uint32_t pageno = 0;
|
||||
};
|
||||
|
||||
|
||||
static inline const std::string &GetFilename(const PostAttachment &att) { return std::get<0>(att); }
|
||||
|
||||
|
@@ -12,13 +12,16 @@ namespace nntpchan
|
||||
|
||||
struct TemplateEngine
|
||||
{
|
||||
typedef std::map<std::string, std::variant<nntpchan::model::Model, std::string>> Args_t;
|
||||
virtual bool WriteTemplate(const fs::path &template_fpath, const Args_t &args, const FileHandle_ptr &out) = 0;
|
||||
virtual ~TemplateEngine() {};
|
||||
virtual bool WriteBoardPage(const nntpchan::model::BoardPage & page, const FileHandle_ptr &out) = 0;
|
||||
virtual bool WriteThreadPage(const nntpchan::model::Thread & thread, const FileHandle_ptr &out) = 0;
|
||||
};
|
||||
|
||||
TemplateEngine *CreateTemplateEngine(const std::string &dialect);
|
||||
|
||||
|
||||
typedef std::unique_ptr<TemplateEngine> TemplateEngine_ptr;
|
||||
|
||||
TemplateEngine * CreateTemplateEngine(const std::string &dialect);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user