-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmarkman.1
More file actions
116 lines (113 loc) · 2.84 KB
/
markman.1
File metadata and controls
116 lines (113 loc) · 2.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
.TH MARKMAN 1 "July 2025" "0.0.0"
.PP
.SH NAME
markman \- markdown to man page converter
.PP
.SH SYNOPSIS
markman [-cCnDhv] [-t TITLE] [-d DATE] [-V VERSION] [-m MIDDLE] [-s SYNOPSIS] [-SECNUM] [FILE]
.PP
.SH DESCRIPTION
.PP
Simple ad hoc generation of Unix man pages from markdown files. It includes customizations and ability to supply additional information or formatting needed for man pages not found in traditional markdown. For example, you can add a synopsis section from a command's help message, convert the title header into the name section, or add a description header before the first paragraph. This allows any markdown document to become a manual, including this very README.
.PP
.SH OPTIONS
.TP
\fB-c\fP
Disable auto capitalization of titles and section headers.
.PP
.TP
\fB-C\fP
Enable auto capitalization of titles and section headers (default).
.PP
.TP
\fB-t TITLE\fP
Title displayed at top of man page, usually name of program. Defaults to file name or 'stdin'.
.PP
.TP
\fB-d DATE\fP
Date man page was updated, displayed at bottom center. Defaults to current date in YYYY-MM-DD format.
.PP
.TP
\fB-V VERSION\fP
Version number of program being documented, displayed at bottom left.
.PP
.TP
\fB-m MIDDLE\fP
Text displayed at top middle of manual. Defaults to name of manual section.
.PP
.TP
\fB-n\fP
Convert the first header into a name section at the top of the man page.
.PP
.TP
\fB-s SYNOPSIS\fP
Text to be inserted as a synopsis section at the top of the man page, under name section.
.PP
.TP
\fB-D\fP
Add description header to the top of the man page, under name or synopsis sections if supplied. This allows most standard markdown documents to conform to the man page convention where the first paragraphs are in the description section.
.PP
.TP
\fB-SECTION\fP
Set man page section number, be can number from 1 to 8:
.PP
.IP \(bu 8
\fB1\fP: General commands
.IP \(bu
\fB2\fP: System calls
.IP \(bu
\fB3\fP: Library functions (eg C standard library)
.IP \(bu
\fB4\fP: Special files and drivers (eg /dev)
.IP \(bu
\fB5\fP: File formats and conventions
.IP \(bu
\fB6\fP: Games and screensavers
.IP \(bu
\fB7\fP: Miscellaneous
.IP \(bu
\fB8\fP: System admin commands and daemons
.TP
\fB-h\fP
Print help and exit.
.PP
.TP
\fB-v\fP
Print version info and exit.
.PP
.SH USAGE
.PP
Convert this README into a man page:
.PP
.RS 4
.EX
markman -Dn -s "`markman -h 2>&1 | cut -d' ' -f2-`" -t $(EXE) -d "`date '+%B %Y'`" -V $(VERSION) README.md > $(EXE).1
.EE
.RE
.SH SEE ALSO
.PP
See project at <https://edryd.org/projects/markman>
.PP
.PP
View source code at <https://git.edryd.org/markman>
.PP
.PP
Projects which use markman to generate their man pages:
.PP
.IP \(bu 2
markman
.IP \(bu
eevo
.IP \(bu
gst
.PP
Pandoc is also a great alternative for a more general purpose markdown converter.
.PP
.SH AUTHOR
.PP
Edryd van Bruggen <[email protected]>
.PP
.SH LICENSE
.PP
zlib License
.PP