markman

markdown man page converter
git clone git://edryd.org/markman
Log | Files | Refs | README | LICENSE

markman.1 (2907B)


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