Sha256: 44fd8940de55fdde3e95c57d7d608487028e748612f04f4bb157126360e370fc

Contents?: true

Size: 1.81 KB

Versions: 1

Compression:

Stored size: 1.81 KB

Contents

#!/usr/bin/env ruby
=begin =======================================================================

# MD2MAN 1 2012-02-06 1.2.0

## NAME

md2man - convert markdown(7) into roff(7)

## SYNOPSIS

`md2man` [*OPTION*]... [*FILE*]

## DESCRIPTION

[md2man] converts markdown(7) input from the given *FILE* into roff(7) using
[Redcarpet] and then prints the result to the standard output stream.  If
*FILE* is not given, then the standard input stream is read in its place.

### Document format

md2man extends markdown(7) syntax in the following ways, as provisioned in the
`Md2Man::Document` module and defined in its derivative `Md2Man::Roff` module:

  * Paragraphs whose lines are all uniformly indented by two spaces are
    considered to be "indented paragraphs".  They are unindented accordingly
    before emission as `.IP` in the roff(7) output.

  * Paragraphs whose subsequent lines (all except the first) are uniformly
    indented by two spaces are considered to be a "tagged paragraphs".  They
    are unindented accordingly before emission as `.TP` in the roff(7) output.

md2man extends markdown(7) semantics in the following ways:

  * There can be at most one top-level heading (H1).  It is emitted as `.TH`
    in the roff(7) output, defining the UNIX manual page's header and footer.

### Markdown extensions

The following [Redcarpet] extensions are enabled while processing markdown(7):

  * tables
  * autolink
  * superscript
  * strikethrough
  * no_intra_emphasis
  * fenced_code_blocks

## OPTIONS

`-h`, `--help`
  Show this help manual.

## SEE ALSO

markdown(7), roff(7)

[md2man]: https://github.com/sunaku/md2man
[Redcarpet]: https://github.com/tanoku/redcarpet

=end =========================================================================

require 'binman'
BinMan.help

require 'md2man'
puts Md2Man::ENGINE.render(ARGF.read)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
md2man-1.2.0 bin/md2man