18namespace seqan3::detail
34class format_man :
public format_help_base<format_man>
37 using base_type = format_help_base<format_man>;
46 format_man() =
default;
47 format_man(format_man
const & pf) =
default;
48 format_man & operator=(format_man
const & pf) =
default;
49 format_man(format_man &&) =
default;
50 format_man & operator=(format_man &&) =
default;
51 ~format_man() =
default;
54 format_man(std::vector<std::string>
const & names,
bool const advanced =
false) : base_type{names,
advanced} {};
61 std::ostream_iterator<char> out(std::cout);
70 return std::toupper(c);
72 std::cout <<
" " <<
std::to_string(meta.man_page_section) <<
" \"" << meta.date <<
"\" \"";
78 return std::tolower(c);
80 std::cout <<
" " << meta.version <<
"\" \"" << meta.man_page_title <<
"\"\n";
83 std::cout <<
".SH NAME\n" << meta.app_name <<
" \\- " << meta.short_description <<
std::endl;
89 void print_section(std::string
const & title)
91 std::ostream_iterator<char> out(std::cout);
98 return std::toupper(c);
101 is_first_in_section =
true;
107 void print_subsection(std::string
const & title)
109 std::cout <<
".SS " << title <<
"\n";
110 is_first_in_section =
true;
119 void print_line(std::string
const & text,
bool const line_is_paragraph)
121 if (!is_first_in_section && line_is_paragraph)
122 std::cout <<
".sp\n";
123 else if (!is_first_in_section && !line_is_paragraph)
124 std::cout <<
".br\n";
126 std::cout << text <<
"\n";
127 is_first_in_section =
false;
139 void print_list_item(std::string
const & term, std::string
const & desc)
141 std::cout <<
".TP\n" << term <<
"\n" << desc <<
"\n";
142 is_first_in_section =
false;
155 std::string in_bold(std::string
const & str)
157 return "\\fB" + str +
"\\fR";
161 bool is_first_in_section{
true};
@ 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.