21namespace seqan3::detail
36class format_html :
public format_help_base<format_html>
39 using base_type = format_help_base<format_html>;
48 format_html() =
default;
49 format_html(format_html
const & pf) =
default;
50 format_html & operator=(format_html
const & pf) =
default;
51 format_html(format_html &&) =
default;
52 format_html & operator=(format_html &&) =
default;
53 ~format_html() =
default;
62 void maybe_close_list()
72 void maybe_close_paragraph()
85 std::cout <<
"<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" "
86 <<
"http://www.w3.org/TR/html4/strict.dtd\">\n"
87 <<
"<html lang=\"en\">\n"
89 <<
"<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">\n"
90 <<
"<title>" << escape_special_xml_chars(meta.app_name) <<
" — "
91 << escape_special_xml_chars(meta.short_description) <<
"</title>\n"
95 std::cout <<
"<h1>" << to_html(meta.app_name) <<
"</h1>\n"
96 <<
"<div>" << to_html(meta.short_description) <<
"</div>\n";
106 maybe_close_paragraph();
107 std::cout <<
"<h2>" << to_html(title) <<
"</h2>\n";
117 maybe_close_paragraph();
118 std::cout <<
"<h3>" << to_html(title) <<
"</h3>\n";
126 void print_line(
std::string const & text,
bool line_is_paragraph)
136 if (line_is_paragraph)
137 maybe_close_paragraph();
154 maybe_close_paragraph();
161 std::cout <<
"<dt>" << to_html(term) <<
"</dt>\n"
162 <<
"<dd>" << to_html(desc) <<
"</dd>\n";
168 maybe_close_paragraph();
180 std::string buffer = escape_special_xml_chars(input);
184 for (
auto it = input.
begin(); it != input.
end(); ++it)
190 assert(!(it == input.
end()));
198 assert(!(it == input.
end()));
207 result.
append(
"<strong>");
211 assert(!open_tags.
empty());
244 return "<strong>" + str +
"</strong>";
@ advanced
Definition: auxiliary.hpp:256
Checks if program is run interactively and retrieves dimensions of terminal (Transferred from seqan2)...
Provides SeqAn version macros and global variables.