18namespace seqan3::detail
33class format_html :
public format_help_base<format_html>
36 using base_type = format_help_base<format_html>;
45 format_html() =
default;
46 format_html(format_html
const & pf) =
default;
47 format_html & operator=(format_html
const & pf) =
default;
48 format_html(format_html &&) =
default;
49 format_html & operator=(format_html &&) =
default;
50 ~format_html() =
default;
58 void maybe_close_list()
68 void maybe_close_paragraph()
81 std::cout <<
"<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" "
82 <<
"http://www.w3.org/TR/html4/strict.dtd\">\n"
83 <<
"<html lang=\"en\">\n"
85 <<
"<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">\n"
86 <<
"<title>" << escape_special_xml_chars(meta.app_name) <<
" — "
87 << escape_special_xml_chars(meta.short_description) <<
"</title>\n"
91 std::cout <<
"<h1>" << to_html(meta.app_name) <<
"</h1>\n"
92 <<
"<div>" << to_html(meta.short_description) <<
"</div>\n";
102 maybe_close_paragraph();
103 std::cout <<
"<h2>" << to_html(title) <<
"</h2>\n";
113 maybe_close_paragraph();
114 std::cout <<
"<h3>" << to_html(title) <<
"</h3>\n";
122 void print_line(
std::string const & text,
bool line_is_paragraph)
132 if (line_is_paragraph)
133 maybe_close_paragraph();
150 maybe_close_paragraph();
157 std::cout <<
"<dt>" << to_html(term) <<
"</dt>\n"
158 <<
"<dd>" << to_html(desc) <<
"</dd>\n";
164 maybe_close_paragraph();
176 std::string buffer = escape_special_xml_chars(input);
180 for (
auto it = input.
begin(); it != input.
end(); ++it)
186 assert(!(it == input.
end()));
194 assert(!(it == input.
end()));
203 result.
append(
"<strong>");
207 assert(!open_tags.
empty());
240 return "<strong>" + str +
"</strong>";
@ advanced
Definition auxiliary.hpp:254
Checks if program is run interactively and retrieves dimensions of terminal (Transferred from seqan2)...
Provides SeqAn version macros and global variables.