21 namespace seqan3::detail
35 class format_man :
public format_help_base<format_man>
38 using base_type = format_help_base<format_man>;
47 format_man() =
default;
48 format_man(format_man
const & pf) =
default;
49 format_man & operator=(format_man
const & pf) =
default;
50 format_man(format_man &&) =
default;
51 format_man & operator=(format_man &&) =
default;
52 ~format_man() =
default;
55 format_man(std::vector<std::string>
const & names,
bool const advanced =
false) : base_type{names,
advanced}
63 std::ostream_iterator<char> out(std::cout);
67 std::transform(meta.app_name.begin(), meta.app_name.end(), out, [] (
unsigned char c) { return std::toupper(c); });
68 std::cout <<
" " << std::to_string(meta.man_page_section) <<
" \"" << meta.date <<
"\" \"";
69 std::transform(meta.app_name.begin(), meta.app_name.end(), out, [] (
unsigned char c) { return std::tolower(c); });
70 std::cout <<
" " << meta.version <<
"\" \"" << meta.man_page_title <<
"\"\n";
73 std::cout <<
".SH NAME\n"
74 << meta.app_name <<
" \\- " << meta.short_description << std::endl;
80 void print_section(std::string
const & title)
82 std::ostream_iterator<char> out(std::cout);
84 std::transform(title.begin(), title.end(), out, [] (
unsigned char c) { return std::toupper(c); });
86 is_first_in_section =
true;
92 void print_subsection(std::string
const & title)
94 std::cout <<
".SS " << title <<
"\n";
95 is_first_in_section =
true;
104 void print_line(std::string
const & text,
bool const line_is_paragraph)
106 if (!is_first_in_section && line_is_paragraph)
107 std::cout <<
".sp\n";
108 else if (!is_first_in_section && !line_is_paragraph)
109 std::cout <<
".br\n";
111 std::cout << text <<
"\n";
112 is_first_in_section =
false;
124 void print_list_item(std::string
const & term, std::string
const & desc)
129 is_first_in_section =
false;
142 std::string in_bold(std::string
const & str)
144 return "\\fB" + str +
"\\fR";
148 bool is_first_in_section{
true};
@ advanced
Definition: auxiliary.hpp:245
decltype(detail::transform< trait_t >(list_t{})) transform
Apply a transformation trait to every type in the list and return a seqan3::type_list of the results.
Definition: traits.hpp:471
Checks if program is run interactively and retrieves dimensions of terminal (Transferred from seqan2)...
Provides SeqAn version macros and global variables.