Add man page.
This commit is contained in:
parent
61136eced5
commit
edb5d29040
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@
|
||||
/menu-helper
|
||||
/compile_commands.json
|
||||
.cache/*
|
||||
/*.1.gz
|
||||
|
7
Makefile
7
Makefile
@ -21,6 +21,7 @@ DEFS=
|
||||
CFLAGS=$(INCFLAGS) -std=c++20 -Wall -Wextra -Wfatal-errors -Werror
|
||||
HDRS=src/util.hpp src/arg_parse.hpp src/db.hpp src/cmd.hpp
|
||||
OBJS=src/main.o src/util.o src/arg_parse.o src/db.o src/cmd.o
|
||||
DOCS=menu-helper.1
|
||||
VERSION=1.0
|
||||
|
||||
ifeq ($(PREFIX),)
|
||||
@ -39,6 +40,9 @@ endif
|
||||
menu-helper: $(OBJS)
|
||||
$(CXX) -o $@ $^ $(LDFLAGS)
|
||||
|
||||
menu-helper.1.gz: $(DOCS)
|
||||
gzip -c $< > $@
|
||||
|
||||
.PHONY: clean distclean install
|
||||
|
||||
clean:
|
||||
@ -47,5 +51,6 @@ clean:
|
||||
distclean: clean
|
||||
$(RM) menu-helper
|
||||
|
||||
install: menu-helper
|
||||
install: menu-helper menu-helper.1.gz
|
||||
install -m 755 menu-helper $(PREFIX)/bin/
|
||||
install -m 644 menu-helper.1.gz $(PREFIX)/share/man/man1/
|
||||
|
2
TODO.md
2
TODO.md
@ -3,7 +3,7 @@
|
||||
- [ ] v1.0
|
||||
- [X] Add basic functionality.
|
||||
- [X] Add more safeguards to avoid bad usage.
|
||||
- [ ] Create a man page.
|
||||
- [X] Create a man page.
|
||||
- [ ] Add more documentation to `help` subcommand.
|
||||
- [X] Properly align output columns from `list` subcommand.
|
||||
- [X] Add feature for editing recipe name and description.
|
||||
|
65
menu-helper.1
Normal file
65
menu-helper.1
Normal file
@ -0,0 +1,65 @@
|
||||
.TH "MENU HELPER" "1" "November 2024" "menu-helper 1.0" "User Commands"
|
||||
.SH "NAME"
|
||||
menu-helper \- makes choosing meals easier
|
||||
.SH "SYNOPSIS"
|
||||
.B menu-helper
|
||||
<\fICOMMAND\fR> [\fIOPTIONS\fR]
|
||||
|
||||
.SH "DESCRIPTION"
|
||||
A program to manage a database of recipes and help you pick out meals based on
|
||||
filters of ingredients and tags.
|
||||
|
||||
.SH "COMMANDS"
|
||||
.TP
|
||||
.B \fBadd\fR, \fBnew\fR
|
||||
Add a new recipe to the database.
|
||||
.TP
|
||||
.B \fBdel\fR, \fBrm\fR <\fIid\fR>
|
||||
Delete recipe with provided \fIid\fR.
|
||||
.TP
|
||||
.B \fBlist\fR, \fBls\fR [-i <\fIingredients\fR>] [-t <\fItags\fR>]
|
||||
List all recipes that contain all \fIingredients\fR an \fItags\fR listed. If
|
||||
none are listed, then it prints all recipes stored in the database. Both
|
||||
\fIingredients\fR and \fItags\fR are comma-separated lists (e.g.
|
||||
"garlic,tomato").
|
||||
.TP
|
||||
.B \fBinfo\fR <\fIid\fR>
|
||||
Show all stored information on recipe with provided \fIid\fR.
|
||||
.TP
|
||||
.B \fBedit-name\fR <\fIid\fR>
|
||||
Change the name of the recipe with the provided \fIid\fR.
|
||||
.TP
|
||||
.B \fBedit-description\fR, \fBedit-desc\fR <\fIid\fR>
|
||||
Change the description of the recipe with the provided \fIid\fR.
|
||||
.TP
|
||||
.B \fBadd-ingr\fR <\fIid\fR> <\fIingredients\fR>
|
||||
Add the specified \fIingredients\fR to the recipe with \fIid\fR, where
|
||||
\fIingredients\fR is a comma-separated list (e.g. "garlic,tomato").
|
||||
.TP
|
||||
.B \fBrm-ingr\fR <\fIid\fR> <\fIingredients\fR>
|
||||
Remove the specified \fIingredients\fR from the recipe with \fIid\fR, where
|
||||
\fIingredients\fR is a comma-separated list (e.g. "garlic,tomato").
|
||||
.TP
|
||||
.B \fBadd-tag\fR <\fIid\fR> <\fItags\fR>
|
||||
Add the specified \fItags\fR to the recipe with \fIid\fR, where \fItags\fR is a
|
||||
comma-separated list (e.g. "dinner,simple").
|
||||
.TP
|
||||
.B \fBrm-tag\fR <\fIid\fR> <\fItags\fR>
|
||||
Remove the specified \fItags\fR from the recipe with \fIid\fR, where \fItags\fR
|
||||
is a comma-separated list (e.g. "dinner,simple").
|
||||
.TP
|
||||
.B \fBhelp\fR, \fB-h\fR, \fB--help\fR
|
||||
Show basic help information.
|
||||
.TP
|
||||
.B \fBversion\fR, \fB-v\fR, \fB--version\fR
|
||||
Show version information.
|
||||
|
||||
.SH "AUTHOR"
|
||||
Written by Nicolás A. Ortega Froysa.
|
||||
|
||||
.SH "COPYRIGHT"
|
||||
Copyright \(co 2024 Ortega Froysa, Nicolás A. <nicolas@ortegas.org>.
|
||||
License: GNU General Public License version 3 or greater (see <https://gnu.org/licenses/gpl.html>).
|
||||
|
||||
This is free software: you are free to change and redistribute it.
|
||||
There is NO WARRANTY, to the extent permitted by law.
|
Loading…
Reference in New Issue
Block a user