/
md2man-roff
executable file
路49 lines (30 loc) 路 1.07 KB
/
md2man-roff
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
#!/usr/bin/env ruby
=begin =======================================================================
# MD2MAN-ROFF 1 2014-10-26 4.0.0
## NAME
md2man-roff - convert md2man(5) flavored markdown(7) into roff(7)
## SYNOPSIS
`md2man-roff` [*OPTION*]... [*FILE*]
## DESCRIPTION
This program converts md2man(5) flavored markdown(7) input from the given
*FILE* into roff(7) 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.
### Limitations
This program does not convert the following [Redcarpet] nodes into roff(7):
* `block_html`
* `strikethrough`
* `superscript`
* `image`
* `raw_html`
It issues a warning when it encounters these instead. Patches are welcome!
## OPTIONS
`-h`, `--help`
Show this help manual.
## SEE ALSO
md2man-html(1), md2man-rake(1), md2man(5)
[Redcarpet]: https://github.com/vmg/redcarpet
=end =========================================================================
require 'binman'
BinMan.help
require 'md2man/roff/engine'
puts Md2Man::Roff::ENGINE.render(ARGF.read)