Create cmd to generate man pages for prof commands

`profanity mangen` will create for each command (`/account`, `/roster`)
an own manpage (`profanity-account.1`, `profanity-roster.1`)

See https://github.com/profanity-im/profanity/issues/1444

Needs some polishing formatting wise.
This commit is contained in:
Michael Vetter
2020-12-04 17:29:31 +01:00
parent 35aecd425f
commit 5e99a791e6
4 changed files with 80 additions and 3 deletions

View File

@@ -69,9 +69,14 @@ static char* theme_name = NULL;
int
main(int argc, char** argv)
{
if (argc == 2 && g_strcmp0(argv[1], "docgen") == 0 && g_strcmp0(PACKAGE_STATUS, "development") == 0) {
command_docgen();
return 0;
if (argc == 2 && g_strcmp0(PACKAGE_STATUS, "development") == 0) {
if (g_strcmp0(argv[1], "docgen") == 0) {
command_docgen();
return 0;
} else if (g_strcmp0(argv[1], "mangen") == 0) {
command_mangen();
return 0;
}
}
static GOptionEntry entries[] = {