Skip to content

Commit 9a8a4dd

Browse files
authored
Merge pull request #56 from HS-Teams/codex/convert-man.txt-to-man.1-format
Convert man template to man page format
2 parents 44a2c8f + beccc65 commit 9a8a4dd

File tree

2 files changed

+55
-43
lines changed

2 files changed

+55
-43
lines changed

templates/txt/man.1

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
.TH ${SCRIPT_NAME} 1 "2025-04-01" "${SCRIPT_NAME} 0.9.0" "User Commands"
2+
.SH NAME
3+
${SCRIPT_NAME} \- script template to start any good shell script.
4+
.SH SYNOPSIS
5+
.B ${SCRIPT_NAME}
6+
.RI "[-hv] [-o" file "] [--timelog] [--ignorelock] args ..."
7+
.SH DESCRIPTION
8+
This manual page documents a reusable shell script template. Update the
9+
placeholders (such as ${SCRIPT_NAME}) to fit the target script before
10+
shipping.
11+
.SH OPTIONS
12+
.TP
13+
.B -o [file], --output=[file]
14+
Set log file (default = /dev/null). Use the DEFAULT keyword to autoname the
15+
file. The default value is /dev/null.
16+
.TP
17+
.B -t, --timelog
18+
Add timestamp to the log in the format "+%y/%m/%d@%H:%M:%S".
19+
.TP
20+
.B -x, --ignorelock
21+
Ignore the presence of a lock file.
22+
.TP
23+
.B -h, --help
24+
Print this help and exit.
25+
.TP
26+
.B -v, --version
27+
Print script information.
28+
.SH EXAMPLES
29+
${SCRIPT_NAME} -o DEFAULT arg1 arg2
30+
.SH IMPLEMENTATION
31+
.TP
32+
.B version
33+
${SCRIPT_NAME} (www.example.com) 0.9.0
34+
.TP
35+
.B author
36+
Hugo Saporetti Junior
37+
.TP
38+
.B copyright
39+
Copyright (c) Hugo Saporetti Junior
40+
.TP
41+
.B license
42+
MIT <https://opensource.org/licenses/MIT>
43+
.SH HISTORY
44+
.TP
45+
.B 2025/03/01
46+
username: Script creation
47+
.TP
48+
.B 2025/04/01
49+
username: Add long options and improvements
50+
.SH DEBUGGING
51+
Uncomment one of the following lines to debug:
52+
.IP \[bu] 2
53+
set -n \fR# Check syntax without execution.
54+
.IP \[bu] 2
55+
set -x \fR# Trace execution for debugging.

templates/txt/man.txt

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)