Skip to content

Commit

Permalink
Updated the Synopsis section and example commands.
Browse files Browse the repository at this point in the history
  • Loading branch information
postmodern committed Dec 4, 2023
1 parent 1e3f358 commit a5e9aa0
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 16 deletions.
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,28 @@ A [Kramdown][kramdown] convert for converting Markdown files into man pages.

## Synopsis

```
usage: kramdown-man [options] MARKDOWN_FILE
-o, --output FILE Write man page output to the file
-V, --version Print the version
-h, --help Print the help output
Examples:
kramdown-man -o man/myprogram.1 man/myprogram.1.md
kramdown-man man/myprogram.1.md
```

Render a man page from markdown:

```shell
kramdown-man <man/myprog.1.md >man/myprog.1
man ./man/myprog.1
kramdown-man -o man/myprogram.1 man/myprogram.1.md
```

Preview the rendered man page:

```shell
kramdown-man man/myprogram.1.md
```

## Examples
Expand Down
23 changes: 16 additions & 7 deletions man/kramdown-man.1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.TH kramdown-man 1 "April 2013" kramdown-man "User Manuals"
.SH SYNOPSIS
.PP
\fBkramdown-man\fR \[lB]\fIoptions\fP\[rB] <\fIINPUT\fP >\fIOUTPUT\fP
\fBkramdown-man\fR \[lB]\fIoptions\fP\[rB] \fIMARKDOWN\[ru]FILE\fP
.SH DESCRIPTION
.PP
A Kramdown
Expand All @@ -12,24 +12,33 @@ A Kramdown
plugin for converting Markdown files into man pages\.
.SH ARGUMENTS
.TP
\fIINPUT\fP
\fIMARKDOWN\[ru]FILE\fP
The input markdown file to convert\.
.TP
\fIOUTPUT\fP
The output file for the man page\.
.SH OPTIONS
.TP
\fB-o\fR, \fB--output\fR \fIOUTPUT\fP
The file to write the man page output to\.
.TP
\fB-V\fR, \fB--version\fR
Prints the \fBkramdown-man\fR version\.
.TP
\fB-h\fR, \fB--help\fR
Prints the usage for \fBkramdown-man\fR\.
.SH EXAMPLE
.PP
Render a man page from markdown:
.PP
.RS 4
.EX
\[Do] kramdown\-man \-o man\[sl]myprogram\.1 man\[sl]myprogram\.1\.md
.EE
.RE
.PP
Preview the rendered man page:
.PP
.RS 4
.EX
\[Do] kramdown\-man <man\[sl]myprog\.1\.md >man\[sl]myprog\.1
\[Do] man \.\[sl]man\[sl]myprog\.1
\[Do] kramdown\-man man\[sl]myprogram\.1\.md
.EE
.RE
.SS RUBY
Expand Down
19 changes: 12 additions & 7 deletions man/kramdown-man.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@

## SYNOPSIS

`kramdown-man` [*options*] \<*INPUT* \>*OUTPUT*
`kramdown-man` [*options*] *MARKDOWN_FILE*

## DESCRIPTION

A [Kramdown][kramdown] plugin for converting Markdown files into man pages.

## ARGUMENTS

*INPUT*
*MARKDOWN_FILE*
: The input markdown file to convert.

*OUTPUT*
: The output file for the man page.

## OPTIONS

`-o`, `--output` *OUTPUT*
: The file to write the man page output to.

`-V`, `--version`
: Prints the `kramdown-man` version.

Expand All @@ -26,8 +26,13 @@ A [Kramdown][kramdown] plugin for converting Markdown files into man pages.

## EXAMPLE

$ kramdown-man <man/myprog.1.md >man/myprog.1
$ man ./man/myprog.1
Render a man page from markdown:

$ kramdown-man -o man/myprogram.1 man/myprogram.1.md

Preview the rendered man page:

$ kramdown-man man/myprogram.1.md

### RUBY

Expand Down

0 comments on commit a5e9aa0

Please sign in to comment.