Update help text and add yait.1

This commit is contained in:
2025-09-16 20:17:25 -04:00
parent 64f4ec7379
commit c7ab23bfe9
3 changed files with 89 additions and 20 deletions

1
TODO
View File

@@ -5,7 +5,6 @@ Todo:
* Polish for 1.0 * Polish for 1.0
* Implement the extra options * Implement the extra options
* Document the extra options * Document the extra options
* Update usage text to work with help2man
* Add build target for man. * Add build target for man.
* Refactor to more GNU style main * Refactor to more GNU style main
* Look into conf file * Look into conf file

View File

@@ -33,25 +33,29 @@ static void usage(int status)
return; return;
} }
puts("Usage: yait [OPTION]... <PATH>"); printf("Usage: %s [OPTION]... [project-name]\n", PROGRAM);
puts("Creates a C project with opinionated defaults"); fputs("\
puts("When only given the first argument it will detect your name\n"); Generates an optionated C project.\n",
puts("Mandatory arguments to long options are mandatory for short options too"); stdout);
print_option("--git", "Initialize git repository (default)"); puts("");
print_option("--no-git", "Do not initialize git repository"); fputs("\
print_option("--lib", "Make this a library"); --help display this help and exit\n\
print_option("-l <licence>", --version display version information and eixt\n",
"Set licence. This list can be found by passing 'list'"); stdout);
print_option("-E", "Open $EDITOR after project creation"); puts("");
print_option("--autotools", "Use the autotools build system"); fputs("\
print_option("--cmake", "Use the cmake build system"); --git Initialize git repository (default)\n\
print_option("--make", "Use the GNU make build system (default)"); --no-git Do not initialize git repository\n\
print_option("--bare", "Minimal C project structure"); --lib Make this a library\n\
print_option("--flat", "All files in project root."); -l <licence> Set licence. This list can be found by passing 'list'\n\
print_option("--extras=<arg1>,<arg2>", -E Open $EDITOR after project creation\n\
"Extra build options, Pass list to list out options."); --autotools Use the autotools build system\n\
puts(" --help display this help text and exit"); --cmake Use the cmake build system\n\
puts(" --version output version information and exit"); --make Use the GNU make build system (default)\n\
--bare Minimal C project structure\n\
--flat All files in project root.\n\
--extras=<arg1>,<arg2> Extra build options, Pass list to list out options.\n",
stdout);
} }
void print_lines(const char *first, ...) void print_lines(const char *first, ...)

66
yait.1 Normal file
View File

@@ -0,0 +1,66 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2.
.TH YAIT "1" "September 2025" "yait beta 156" "User Commands"
.SH NAME
yait \- manual page for yait beta 156
.SH SYNOPSIS
.B yait
[\fI\,OPTION\/\fR]... [\fI\,project-name\/\fR]
.SH DESCRIPTION
Generates an optionated C project.
.TP
\fB\-\-help\fR
display this help and exit
.TP
\fB\-\-version\fR
display version information and eixt
.TP
\fB\-\-git\fR
Initialize git repository (default)
.TP
\fB\-\-no\-git\fR
Do not initialize git repository
.TP
\fB\-\-lib\fR
Make this a library
.TP
\fB\-l\fR <licence>
Set licence. This list can be found by passing 'list'
.TP
\fB\-E\fR
Open $EDITOR after project creation
.TP
\fB\-\-autotools\fR
Use the autotools build system
.TP
\fB\-\-cmake\fR
Use the cmake build system
.TP
\fB\-\-make\fR
Use the GNU make build system (default)
.TP
\fB\-\-bare\fR
Minimal C project structure
.TP
\fB\-\-flat\fR
All files in project root.
.TP
\fB\-\-extras=\fR<arg1>,<arg2>
Extra build options, Pass list to list out options.
.SH COPYRIGHT
Copyright \(co 2025 GCK.
License BSD\-3\-Clause: BSD\-3\-Clause <https://opensource.org/license/bsd\-3\-clause>
.br
This is free software: you are free to change and redistribute it.
There is NO WARRNTY, to the extent permitted by law.
.SH "SEE ALSO"
The full documentation for
.B yait
is maintained as a Texinfo manual. If the
.B info
and
.B yait
programs are properly installed at your site, the command
.IP
.B info yait
.PP
should give you access to the complete manual.