10#include <tidybuffio.h>
36 std::string title{
""};
37 std::string icon_url{
""};
38 std::string img_url{
""};
39 std::string rss_url{
""};
40 std::string description{
""};
41 std::string article{
""};
47 static void configure_tidy_doc(TidyDoc &doc);
52 TidyDoc tidy_doc_from_file(std::string path);
57 std::string convert_to_xml(TidyDoc doc);
59 static inline const std::vector<std::string> USELESS_CHILDREN = {
60 "script",
"form",
"input",
"label",
"nav",
"footer",
"header"
67 void remove_useless_children(xml_node &root);
77 xml_node get_body_node();
86 Html(std::string path);
103 std::string
to_json(
bool metadata_only=
false);
Represents an HTML document.
Definition html.hpp:31
std::string get_body()
Definition html.cpp:173
std::string get_description()
Definition html.cpp:204
std::string to_json(bool metadata_only=false)
Definition html.cpp:224
static Html from_string(std::string s)
Constructs the Html object from a string containing valid HTML.
Definition html.cpp:71
std::string get_article()
Definition html.cpp:182
std::string get_rss_url()
Definition html.cpp:152
std::string get_icon_url()
Definition html.cpp:86
std::string get_img_url()
Definition html.cpp:129
std::string get_title()
Definition html.cpp:79