#!/usr/bin/env ruby =begin ======================================================================= # MD2MAN-HTML 1 2013-05-04 1.6.1 ## NAME md2man-html - convert md2man(1) flavored markdown(7) into HTML ## SYNOPSIS `md2man-html` [*OPTION*]... [*FILE*] ## DESCRIPTION This program converts the markdown(7) input from the given *FILE* into HTML and then prints the result to stdout. stdin is read if *FILE* is not given. ### Document format See md2man(1) for details about the document format and Markdown extensions. ### Cross linking References to other manual pages are converted into hyperlinks that have class="manpage-reference" and href="../man${section}/${page}.${section}.html" attributes. For example, the markdown(7) reference would be converted into HTML as: markdown(7) ## OPTIONS `-h`, `--help` Show this help manual. ## SEE ALSO md2man(1) =end ========================================================================= require 'binman' BinMan.help require 'md2man/html/engine' puts Md2Man::HTML::ENGINE.render(ARGF.read)