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;
61 void maybe_close_list()
71 void maybe_close_paragraph()
84 std::cout <<
"<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" "
85 <<
"http://www.w3.org/TR/html4/strict.dtd\">\n"
86 <<
"<html lang=\"en\">\n"
88 <<
"<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">\n"
89 <<
"<title>" << escape_special_xml_chars(meta.app_name) <<
" — "
90 << escape_special_xml_chars(meta.short_description) <<
"</title>\n"
94 std::cout <<
"<h1>" << to_html(meta.app_name) <<
"</h1>\n"
95 <<
"<div>" << to_html(meta.short_description) <<
"</div>\n";
105 maybe_close_paragraph();
106 std::cout <<
"<h2>" << to_html(title) <<
"</h2>\n";
116 maybe_close_paragraph();
117 std::cout <<
"<h3>" << to_html(title) <<
"</h3>\n";
125 void print_line(
std::string const & text,
bool line_is_paragraph)
135 if (line_is_paragraph)
136 maybe_close_paragraph();
153 maybe_close_paragraph();
160 std::cout <<
"<dt>" << to_html(term) <<
"</dt>\n"
161 <<
"<dd>" << to_html(desc) <<
"</dd>\n";
167 maybe_close_paragraph();
179 std::string buffer = escape_special_xml_chars(input);
183 for (
auto it = input.
begin(); it != input.
end(); ++it)
189 assert(!(it == input.
end()));
197 assert(!(it == input.
end()));
206 result.
append(
"<strong>");
210 assert(!open_tags.
empty());
243 return "<strong>" + str +
"</strong>";
@ advanced
Definition: auxiliary.hpp:255
Checks if program is run interactively and retrieves dimensions of terminal (Transferred from seqan2)...
Provides SeqAn version macros and global variables.