man/man0/README.html in binman-3.4.1 vs man/man0/README.html in binman-4.0.0
- old
+ new
@@ -1,21 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
- <meta name="generator" content="md2man 3.0.0 https://github.com/sunaku/md2man" />
+ <meta name="generator" content="md2man 4.0.0 https://github.com/sunaku/md2man" />
<title>README</title>
<link rel="stylesheet" href="../style.css"/>
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
</head>
<body><div class="navbar"><div class="navbar-inner"><span class="brand"><a href="../index.html#man0">man0</a>/README</span></div></div><div class="container-fluid"><h1 id="binman-man-pages-for"><a name="binman-man-pages-for" href="#binman-man-pages-for" class="md2man-permalink" title="permalink"></a><span class="md2man-title">binman</span> <span class="md2man-section">-</span> <span class="md2man-date">man</span> <span class="md2man-source">pages</span> <span class="md2man-manual">for</span></h1><p><a href="https://github.com/sunaku/binman">binman</a> produces UNIX manual pages for executable scripts using <a href="https://github.com/sunaku/md2man">md2man</a>.
Simply <a href="https://sunaku.github.io/md2man/man/man5/md2man.5.html">document your script in Markdown</a> as a comment at the
top of your script and call <code>binman show</code> to display it as a UNIX manual page!
Or, call <code>binman help</code> to display your manual <em>only</em> when your script receives
-with <code>-h</code> or <code>--help</code> command-line options. Or, call <code>binman load</code> to extract
+with <code>-h</code> or <code>--help</code> command-line options. Or, call <code>binman snip</code> to extract
the manual from your script for your own custom processing, outside of binman.
-And that's not all: <a href="https://sunaku.github.io/binman/man/man1/binman.1.html">see the manual</a> for even more possibilities!</p>
+And that's not all: <a href="https://sunaku.github.io/binman/man/man1/binman.1.html">see the manual page</a> for more possibilities!</p>
<ul>
<li>Manuals: <a href="https://sunaku.github.io/binman/man">https://sunaku.github.io/binman/man</a></li>
<li>Sources: <a href="https://github.com/sunaku/binman">https://github.com/sunaku/binman</a></li>
<li>Support: <a href="https://github.com/sunaku/binman/issues">https://github.com/sunaku/binman/issues</a></li>
<li>Package: <a href="https://rubygems.org/gems/binman">https://rubygems.org/gems/binman</a></li>
@@ -27,239 +27,222 @@
Perl, Python, Node.js, Tcl, AWK, UNIX shell, and more!</p></li>
<li><p>Provides a Ruby library and a command-line client too.</p></li>
<li><p>Individual extraction, conversion, and display commands.</p></li>
<li><p>Implemented in roughly 150 lines of pure Ruby code! :-)</p></li>
</ul>
-<h3 id="demonstration"><a name="demonstration" href="#demonstration" class="md2man-permalink" title="permalink"></a>Demonstration</h3><p><img src="EXAMPLE.png" alt="Obligatory screen-shot of binman(1) in action!"></p><p>Here are some working examples of Ruby bin scripts to help you get started:</p>
+<h3 id="demonstration"><a name="demonstration" href="#demonstration" class="md2man-permalink" title="permalink"></a>Demonstration</h3><p><img src="EXAMPLE.png" alt="Obligatory screen-shot of binman(1) in action!"></p><h4 id="what-can-binman-1-do"><a name="what-can-binman-1-do" href="#what-can-binman-1-do" class="md2man-permalink" title="permalink"></a>What can <a class="md2man-reference" href="../man1/binman.1.html">binman(1)</a> do?</h4><p>Here are some real examples of processed bin scripts to help you get started:</p>
<ul>
-<li><a class="md2man-reference">tork(1)</a>:
-<a href="https://raw.github.com/sunaku/tork/master/bin/tork">Ruby source</a> →
-<a href="https://sunaku.github.io/tork/man/man1/tork.1.html">HTML result</a> +
-<a href="https://sunaku.github.io/tork/man/man1/tork.1">roff result</a></li>
-<li><a class="md2man-reference">tork-runner(1)</a>:
-<a href="https://raw.github.com/sunaku/tork/master/bin/tork-runner">Ruby source</a> →
-<a href="https://sunaku.github.io/tork/man/man1/tork-runner.1.html">HTML result</a> +
-<a href="https://sunaku.github.io/tork/man/man1/tork-runner.1">roff result</a></li>
-<li><a class="md2man-reference">tork-herald(1)</a>:
-<a href="https://raw.github.com/sunaku/tork/master/bin/tork-herald">Ruby source</a> →
-<a href="https://sunaku.github.io/tork/man/man1/tork-herald.1.html">HTML result</a> +
-<a href="https://sunaku.github.io/tork/man/man1/tork-herald.1">roff result</a></li>
-<li><a class="md2man-reference">tork-driver(1)</a>:
-<a href="https://raw.github.com/sunaku/tork/master/bin/tork-driver">Ruby source</a> →
-<a href="https://sunaku.github.io/tork/man/man1/tork-driver.1.html">HTML result</a> +
-<a href="https://sunaku.github.io/tork/man/man1/tork-driver.1">roff result</a></li>
-<li><a class="md2man-reference">tork-engine(1)</a>:
-<a href="https://raw.github.com/sunaku/tork/master/bin/tork-engine">Ruby source</a> →
-<a href="https://sunaku.github.io/tork/man/man1/tork-engine.1.html">HTML result</a> +
-<a href="https://sunaku.github.io/tork/man/man1/tork-engine.1">roff result</a></li>
-<li><a class="md2man-reference">tork-master(1)</a>:
-<a href="https://raw.github.com/sunaku/tork/master/bin/tork-master">Ruby source</a> →
-<a href="https://sunaku.github.io/tork/man/man1/tork-master.1.html">HTML result</a> +
-<a href="https://sunaku.github.io/tork/man/man1/tork-master.1">roff result</a></li>
-<li><a class="md2man-reference">tork-remote(1)</a>:
-<a href="https://raw.github.com/sunaku/tork/master/bin/tork-remote">Ruby source</a> →
-<a href="https://sunaku.github.io/tork/man/man1/tork-remote.1.html">HTML result</a> +
-<a href="https://sunaku.github.io/tork/man/man1/tork-remote.1">roff result</a></li>
-<li><a class="md2man-reference">tork-notify(1)</a>:
-<a href="https://raw.github.com/sunaku/tork/master/bin/tork-notify">Ruby source</a> →
-<a href="https://sunaku.github.io/tork/man/man1/tork-notify.1.html">HTML result</a> +
-<a href="https://sunaku.github.io/tork/man/man1/tork-notify.1">roff result</a></li>
-<li><a class="md2man-reference">md2man-roff(1)</a>:
-<a href="https://raw.github.com/sunaku/md2man/master/bin/md2man-roff">Ruby source</a> →
-<a href="https://sunaku.github.io/md2man/man/man1/md2man-roff.1.html">HTML result</a> +
-<a href="https://sunaku.github.io/md2man/man/man1/md2man-roff.1">roff result</a></li>
-<li><a class="md2man-reference">md2man-html(1)</a>:
-<a href="https://raw.github.com/sunaku/md2man/master/bin/md2man-html">Ruby source</a> →
-<a href="https://sunaku.github.io/md2man/man/man1/md2man-html.1.html">HTML result</a> +
-<a href="https://sunaku.github.io/md2man/man/man1/md2man-html.1">roff result</a></li>
-<li><a class="md2man-reference">md2man-rake(1)</a>:
-<a href="https://raw.github.com/sunaku/md2man/master/bin/md2man-rake">Ruby source</a> →
-<a href="https://sunaku.github.io/md2man/man/man1/md2man-rake.1.html">HTML result</a> +
-<a href="https://sunaku.github.io/md2man/man/man1/md2man-rake.1">roff result</a></li>
-<li><a class="md2man-reference" href="../man1/binman.1.html">binman(1)</a>:
-<a href="https://raw.github.com/sunaku/binman/master/bin/binman">Ruby source</a> →
-<a href="https://sunaku.github.io/binman/man/man1/binman.1.html">HTML result</a> +
-<a href="https://sunaku.github.io/binman/man/man1/binman.1">roff result</a></li>
-<li><a class="md2man-reference" href="../man1/binman-rake.1.html">binman-rake(1)</a>:
-<a href="https://raw.github.com/sunaku/binman/master/bin/binman-rake">Ruby source</a> →
-<a href="https://sunaku.github.io/binman/man/man1/binman-rake.1.html">HTML result</a> +
-<a href="https://sunaku.github.io/binman/man/man1/binman-rake.1">roff result</a></li>
+<li><a href="https://raw.github.com/sunaku/tork/master/bin/tork">bin/tork</a> ⇒
+<a href="https://sunaku.github.io/tork/man/man1/tork.1.markdown">tork.1.markdown</a> ⇒
+<a href="https://sunaku.github.io/tork/man/man1/tork.1">tork.1</a> +
+<a href="https://sunaku.github.io/tork/man/man1/tork.1.html">tork.1.html</a></li>
+<li><a href="https://raw.github.com/sunaku/tork/master/bin/tork-runner">bin/tork-runner</a> ⇒
+<a href="https://sunaku.github.io/tork/man/man1/tork-runner.1.markdown">tork-runner.1.markdown</a> ⇒
+<a href="https://sunaku.github.io/tork/man/man1/tork-runner.1">tork-runner.1</a> +
+<a href="https://sunaku.github.io/tork/man/man1/tork-runner.1.html">tork-runner.1.html</a></li>
+<li><a href="https://raw.github.com/sunaku/tork/master/bin/tork-herald">bin/tork-herald</a> ⇒
+<a href="https://sunaku.github.io/tork/man/man1/tork-herald.1.markdown">tork-herald.1.markdown</a> ⇒
+<a href="https://sunaku.github.io/tork/man/man1/tork-herald.1">tork-herald.1</a> +
+<a href="https://sunaku.github.io/tork/man/man1/tork-herald.1.html">tork-herald.1.html</a></li>
+<li><a href="https://raw.github.com/sunaku/tork/master/bin/tork-driver">bin/tork-driver</a> ⇒
+<a href="https://sunaku.github.io/tork/man/man1/tork-driver.1.markdown">tork-driver.1.markdown</a> ⇒
+<a href="https://sunaku.github.io/tork/man/man1/tork-driver.1">tork-driver.1</a> +
+<a href="https://sunaku.github.io/tork/man/man1/tork-driver.1.html">tork-driver.1.html</a></li>
+<li><a href="https://raw.github.com/sunaku/tork/master/bin/tork-engine">bin/tork-engine</a> ⇒
+<a href="https://sunaku.github.io/tork/man/man1/tork-engine.1.markdown">tork-engine.1.markdown</a> ⇒
+<a href="https://sunaku.github.io/tork/man/man1/tork-engine.1">tork-engine.1</a> +
+<a href="https://sunaku.github.io/tork/man/man1/tork-engine.1.html">tork-engine.1.html</a></li>
+<li><a href="https://raw.github.com/sunaku/tork/master/bin/tork-master">bin/tork-master</a> ⇒
+<a href="https://sunaku.github.io/tork/man/man1/tork-master.1.markdown">tork-master.1.markdown</a> ⇒
+<a href="https://sunaku.github.io/tork/man/man1/tork-master.1">tork-master.1</a> +
+<a href="https://sunaku.github.io/tork/man/man1/tork-master.1.html">tork-master.1.html</a></li>
+<li><a href="https://raw.github.com/sunaku/tork/master/bin/tork-remote">bin/tork-remote</a> ⇒
+<a href="https://sunaku.github.io/tork/man/man1/tork-remote.1.markdown">tork-remote.1.markdown</a> ⇒
+<a href="https://sunaku.github.io/tork/man/man1/tork-remote.1">tork-remote.1</a> +
+<a href="https://sunaku.github.io/tork/man/man1/tork-remote.1.html">tork-remote.1.html</a></li>
+<li><a href="https://raw.github.com/sunaku/tork/master/bin/tork-notify">bin/tork-notify</a> ⇒
+<a href="https://sunaku.github.io/tork/man/man1/tork-notify.1.markdown">tork-notify.1.markdown</a> ⇒
+<a href="https://sunaku.github.io/tork/man/man1/tork-notify.1">tork-notify.1</a> +
+<a href="https://sunaku.github.io/tork/man/man1/tork-notify.1.html">tork-notify.1.html</a></li>
+<li><a href="https://raw.github.com/sunaku/md2man/master/bin/md2man-roff">bin/md2man-roff</a> ⇒
+<a href="https://sunaku.github.io/md2man/man/man1/md2man-roff.1.markdown">md2man-roff.1.markdown</a> ⇒
+<a href="https://sunaku.github.io/md2man/man/man1/md2man-roff.1">md2man-roff.1</a> +
+<a href="https://sunaku.github.io/md2man/man/man1/md2man-roff.1.html">md2man-roff.1.html</a></li>
+<li><a href="https://raw.github.com/sunaku/md2man/master/bin/md2man-html">bin/md2man-html</a> ⇒
+<a href="https://sunaku.github.io/md2man/man/man1/md2man-html.1.markdown">md2man-html.1.markdown</a> ⇒
+<a href="https://sunaku.github.io/md2man/man/man1/md2man-html.1">md2man-html.1</a> +
+<a href="https://sunaku.github.io/md2man/man/man1/md2man-html.1.html">md2man-html.1.html</a></li>
+<li><a href="https://raw.github.com/sunaku/md2man/master/bin/md2man-rake">bin/md2man-rake</a> ⇒
+<a href="https://sunaku.github.io/md2man/man/man1/md2man-rake.1.markdown">md2man-rake.1.markdown</a> ⇒
+<a href="https://sunaku.github.io/md2man/man/man1/md2man-rake.1">md2man-rake.1</a> +
+<a href="https://sunaku.github.io/md2man/man/man1/md2man-rake.1.html">md2man-rake.1.html</a></li>
+<li><a href="https://raw.github.com/sunaku/binman/master/bin/binman">bin/binman</a> ⇒
+<a href="https://sunaku.github.io/binman/man/man1/binman.1.markdown">binman.1.markdown</a> ⇒
+<a href="https://sunaku.github.io/binman/man/man1/binman.1">binman.1</a> +
+<a href="https://sunaku.github.io/binman/man/man1/binman.1.html">binman.1.html</a></li>
+<li><a href="https://raw.github.com/sunaku/binman/master/bin/binman-rake">bin/binman-rake</a> ⇒
+<a href="https://sunaku.github.io/binman/man/man1/binman-rake.1.markdown">binman-rake.1.markdown</a> ⇒
+<a href="https://sunaku.github.io/binman/man/man1/binman-rake.1">binman-rake.1</a> +
+<a href="https://sunaku.github.io/binman/man/man1/binman-rake.1.html">binman-rake.1.html</a></li>
</ul>
-<p>For examples in other scripting languages, see the "Usage" section below!</p><h2 id="installation"><a name="installation" href="#installation" class="md2man-permalink" title="permalink"></a>Installation</h2><p>If you only want to view pre-built manual pages:</p>
-<pre><code class="sh">gem install binman
+<p>For examples in even more scripting languages, see the "Usage" section below!</p><h4 id="what-can-binman-rake-1-do"><a name="what-can-binman-rake-1-do" href="#what-can-binman-rake-1-do" class="md2man-permalink" title="permalink"></a>What can <a class="md2man-reference" href="../man1/binman-rake.1.html">binman-rake(1)</a> do?</h4><p>Here are some examples of HTML manual <em>sets</em> produced by <a class="md2man-reference" href="../man1/binman-rake.1.html">binman-rake(1)</a>:</p>
+<ul>
+<li><a href="https://sunaku.github.io/tork/man">https://sunaku.github.io/tork/man</a></li>
+<li><a href="https://sunaku.github.io/binman/man">https://sunaku.github.io/binman/man</a></li>
+<li><a href="https://sunaku.github.io/md2man/man">https://sunaku.github.io/md2man/man</a></li>
+</ul>
+<h2 id="installation"><a name="installation" href="#installation" class="md2man-permalink" title="permalink"></a>Installation</h2><p>If you only want to view pre-built manual pages:</p><pre><code>gem install binman
</code></pre>
-<p>If you also want to build your own manual pages:</p>
-<pre><code class="sh">gem install md2man -v '~> 3.0'
+<p>If you also want to build your own manual pages:</p><pre><code>gem install md2man -v '~> 4.0'
</code></pre>
<h3 id="prerequisites"><a name="prerequisites" href="#prerequisites" class="md2man-permalink" title="permalink"></a>Prerequisites</h3>
<ul>
<li>Ruby 1.8.7 or 1.9.2 or newer.</li>
</ul>
-<h3 id="development"><a name="development" href="#development" class="md2man-permalink" title="permalink"></a>Development</h3>
-<pre><code class="sh">git clone git://github.com/sunaku/binman
+<h3 id="development"><a name="development" href="#development" class="md2man-permalink" title="permalink"></a>Development</h3><pre><code>git clone git://github.com/sunaku/binman
cd binman
bundle install
bundle exec binman --help # run it directly
bundle exec rake --tasks # packaging tasks
</code></pre>
-<h2 id="usage"><a name="usage" href="#usage" class="md2man-permalink" title="permalink"></a>Usage</h2><h3 id="at-the-command-line"><a name="at-the-command-line" href="#at-the-command-line" class="md2man-permalink" title="permalink"></a>At the command line</h3><p>See <a class="md2man-reference" href="../man1/binman.1.html">binman(1)</a> manual:</p>
-<pre><code class="sh">binman --help
+<h2 id="usage"><a name="usage" href="#usage" class="md2man-permalink" title="permalink"></a>Usage</h2><h3 id="at-the-command-line"><a name="at-the-command-line" href="#at-the-command-line" class="md2man-permalink" title="permalink"></a>At the command line</h3><p>See <a class="md2man-reference" href="../man1/binman.1.html">binman(1)</a> manual:</p><pre><code>binman --help
</code></pre>
-<h3 id="inside-a-ruby-script"><a name="inside-a-ruby-script" href="#inside-a-ruby-script" class="md2man-permalink" title="permalink"></a>Inside a Ruby script</h3>
-<pre><code class="ruby">#!/usr/bin/env ruby
+<h3 id="inside-a-ruby-script"><a name="inside-a-ruby-script" href="#inside-a-ruby-script" class="md2man-permalink" title="permalink"></a>Inside a Ruby script</h3><pre><code>#!/usr/bin/env ruby
# your program's manual page goes here
require 'binman'
# OPTION 1: show manual and exit if ARGV has -h or --help except after --
BinMan.help
# OPTION 2: show manual unconditionally
BinMan.show
</code></pre>
-<p>You can also specify your program's source file encoding above the manual:</p>
-<pre><code class="ruby">#!/usr/bin/env ruby
+<p>You can also specify your program's source file encoding above the manual:</p><pre><code>#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
# your program's manual page goes here
</code></pre>
-<p>You can also write the manual as a multi-line Ruby comment:</p>
-<pre><code class="ruby">#!/usr/bin/env ruby
+<p>You can also write the manual as a multi-line Ruby comment:</p><pre><code>#!/usr/bin/env ruby
=begin
your program's manual page goes here
=end
</code></pre>
-<p>You can also specify your program's source file encoding above the manual:</p>
-<pre><code class="ruby">#!/usr/bin/env ruby
+<p>You can also specify your program's source file encoding above the manual:</p><pre><code>#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
=begin
your program's manual page goes here
=end
</code></pre>
-<p>See the <a href="http://rubydoc.info/gems/binman/frames">API documentation</a> for even more possibilities!</p><h3 id="inside-a-shell-script"><a name="inside-a-shell-script" href="#inside-a-shell-script" class="md2man-permalink" title="permalink"></a>Inside a shell script</h3>
-<pre><code class="ruby">#!/usr/bin/sh
+<p>See the <a href="http://rubydoc.info/gems/binman/frames">API documentation</a> for even more possibilities!</p><h3 id="inside-a-shell-script"><a name="inside-a-shell-script" href="#inside-a-shell-script" class="md2man-permalink" title="permalink"></a>Inside a shell script</h3><pre><code>#!/usr/bin/sh
# your program's manual page goes here
# OPTION 1: show manual and exit if ARGV has -h or --help except after --
binman help "$0" "$@" && exit
# OPTION 2: show manual unconditionally
binman show "$0"
</code></pre>
-<h3 id="inside-a-perl-script"><a name="inside-a-perl-script" href="#inside-a-perl-script" class="md2man-permalink" title="permalink"></a>Inside a Perl script</h3>
-<pre><code class="perl">#!/usr/bin/env perl
+<h3 id="inside-a-perl-script"><a name="inside-a-perl-script" href="#inside-a-perl-script" class="md2man-permalink" title="permalink"></a>Inside a Perl script</h3><pre><code>#!/usr/bin/env perl
# your program's manual page goes here
# OPTION 1: show manual and exit if ARGV has -h or --help except after --
system('binman', 'help', __FILE__, @ARGV) == 0 and exit;
# OPTION 2: show manual unconditionally
system('binman', 'show', __FILE__);
</code></pre>
-<p>You can also write the manual as a multi-line Ruby comment after <code>__END__</code>:</p>
-<pre><code class="perl">#!/usr/bin/env perl
+<p>You can also write the manual as a multi-line Ruby comment after <code>__END__</code>:</p><pre><code>#!/usr/bin/env perl
print "your program's code goes here";
__END__
=begin
your program's manual page goes here
=end
</code></pre>
-<h3 id="inside-a-python-script"><a name="inside-a-python-script" href="#inside-a-python-script" class="md2man-permalink" title="permalink"></a>Inside a Python script</h3>
-<pre><code class="python">#!/usr/bin/env python
+<h3 id="inside-a-python-script"><a name="inside-a-python-script" href="#inside-a-python-script" class="md2man-permalink" title="permalink"></a>Inside a Python script</h3><pre><code>#!/usr/bin/env python
# your program's manual page goes here
import sys, subprocess
# OPTION 1: show manual and exit if ARGV has -h or --help except after --
subprocess.call(['binman', 'help', __file__] + sys.argv) == 0 and sys.exit()
# OPTION 2: show manual unconditionally
subprocess.call(['binman', 'show', __file__])
</code></pre>
-<p>You can also specify your program's source file encoding above the manual:</p>
-<pre><code class="python">#!/usr/bin/env python
+<p>You can also specify your program's source file encoding above the manual:</p><pre><code>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# your program's manual page goes here
</code></pre>
-<p>You can also write the manual as a multi-line Ruby comment inside a docstring:</p>
-<pre><code class="python">#!/usr/bin/env python
+<p>You can also write the manual as a multi-line Ruby comment inside a docstring:</p><pre><code>#!/usr/bin/env python
"""
=begin
your program's manual page goes here
=end
"""
</code></pre>
-<p>You can also specify your program's source file encoding above the manual:</p>
-<pre><code class="python">#!/usr/bin/env python
+<p>You can also specify your program's source file encoding above the manual:</p><pre><code>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
=begin
your program's manual page goes here
=end
"""
</code></pre>
-<h3 id="inside-an-awk-script"><a name="inside-an-awk-script" href="#inside-an-awk-script" class="md2man-permalink" title="permalink"></a>Inside an AWK script</h3><p>The technique for determining current AWK script file name <a href="http://www.mombu.com/programming/programming/t-the-name-of-script-itself-2040784-print.html">comes from here</a>.</p>
-<pre><code class="awk">#!/usr/bin/awk -f
+<h3 id="inside-an-awk-script"><a name="inside-an-awk-script" href="#inside-an-awk-script" class="md2man-permalink" title="permalink"></a>Inside an AWK script</h3><p>The technique for determining current AWK script file name <a href="http://www.mombu.com/programming/programming/t-the-name-of-script-itself-2040784-print.html">comes from here</a>.</p><pre><code>#!/usr/bin/awk -f
# your program's manual page goes here
# OPTION 1: show manual and exit if ARGV has -h or --help except after --
BEGIN {getline c <"/proc/self/cmdline"; sub(".*-f\0"," ",c); gsub("\0"," ",c);
if(system("binman help" c) == 0){ exit }}
# OPTION 2: show manual unconditionally
BEGIN {getline c <"/proc/self/cmdline"; sub(".*-f\0"," ",c); sub("\0.*","",c);
system("binman show" c)}
</code></pre>
-<h3 id="inside-a-tcl-script"><a name="inside-a-tcl-script" href="#inside-a-tcl-script" class="md2man-permalink" title="permalink"></a>Inside a Tcl script</h3>
-<pre><code class="tcl">#!/usr/bin/env tclsh
+<h3 id="inside-a-tcl-script"><a name="inside-a-tcl-script" href="#inside-a-tcl-script" class="md2man-permalink" title="permalink"></a>Inside a Tcl script</h3><pre><code>#!/usr/bin/env tclsh
# your program's manual page goes here
# OPTION 1: show manual and exit if ARGV has -h or --help except after --
if {![catch {exec -- >/dev/tty binman help $argv0 {*}$argv}]} {exit}
# OPTION 2: show manual unconditionally
exec >/dev/tty binman show $argv0
</code></pre>
-<p>You can also write the manual as a multi-line Ruby comment inside an <code>if 0</code>:</p>
-<pre><code class="tcl">#!/usr/bin/env tclsh
+<p>You can also write the manual as a multi-line Ruby comment inside an <code>if 0</code>:</p><pre><code>#!/usr/bin/env tclsh
if 0 {
=begin
your program's manual page goes here
=end
}
</code></pre>
-<h3 id="inside-a-node-js-script"><a name="inside-a-node-js-script" href="#inside-a-node-js-script" class="md2man-permalink" title="permalink"></a>Inside a Node.js script</h3>
-<pre><code class="javascript">/*
+<h3 id="inside-a-node-js-script"><a name="inside-a-node-js-script" href="#inside-a-node-js-script" class="md2man-permalink" title="permalink"></a>Inside a Node.js script</h3><pre><code>/*
=begin
your program's manual page goes here
=end
*/
var exec = require('child_process').exec;
// OPTION 1: show manual and exit if ARGV has -h or --help except after --
exec(['>/dev/tty', 'binman', 'help', __filename].concat(process.argv).
-join(' '), <a class="md2man-reference">function(error)</a>{ if (error === null){ process.exit(); } });
+join(' '), function(error){ if (error === null){ process.exit(); } });
// OPTION 2: show manual unconditionally
exec(['>/dev/tty', 'binman', 'show', __filename].join(' '));
</code></pre>
-<h2 id="packaging"><a name="packaging" href="#packaging" class="md2man-permalink" title="permalink"></a>Packaging</h2><h3 id="building-man-pages"><a name="building-man-pages" href="#building-man-pages" class="md2man-permalink" title="permalink"></a>Building man pages</h3><h4 id="at-the-command-line-1"><a name="at-the-command-line-1" href="#at-the-command-line-1" class="md2man-permalink" title="permalink"></a>At the command line</h4><p>See <a class="md2man-reference" href="../man1/binman-rake.1.html">binman-rake(1)</a> manual:</p>
-<pre><code class="sh">binman-rake --help
+<h2 id="packaging"><a name="packaging" href="#packaging" class="md2man-permalink" title="permalink"></a>Packaging</h2><h3 id="building-man-pages"><a name="building-man-pages" href="#building-man-pages" class="md2man-permalink" title="permalink"></a>Building man pages</h3><h4 id="at-the-command-line-1"><a name="at-the-command-line-1" href="#at-the-command-line-1" class="md2man-permalink" title="permalink"></a>At the command line</h4><p>See <a class="md2man-reference" href="../man1/binman-rake.1.html">binman-rake(1)</a> manual:</p><pre><code>binman-rake --help
</code></pre>
-<h4 id="inside-a-ruby-script-1"><a name="inside-a-ruby-script-1" href="#inside-a-ruby-script-1" class="md2man-permalink" title="permalink"></a>Inside a Ruby script</h4><p>Add this snippet to your gemspec file:</p>
-<pre><code class="ruby">s.files += Dir['man/man?/*.?'] # UNIX man pages
+<h4 id="inside-a-ruby-script-1"><a name="inside-a-ruby-script-1" href="#inside-a-ruby-script-1" class="md2man-permalink" title="permalink"></a>Inside a Ruby script</h4><p>Add this snippet to your gemspec file:</p><pre><code>s.files += Dir['man/man?/*.?'] # UNIX man pages
s.files += Dir['man/**/*.{html,css,js}'] # HTML man pages
-s.add_development_dependency 'md2man', '~> 3.0'
+s.add_development_dependency 'md2man', '~> 4.0'
</code></pre>
-<p>Add the following line to your Rakefile:</p>
-<pre><code class="ruby">require 'binman/rakefile'
+<p>Add the following line to your Rakefile:</p><pre><code>require 'binman/rakefile'
</code></pre>
<p>You now have a <code>rake binman</code> task that pre-builds UNIX manual page files for
your <code>bin/</code> scripts into a <code>man/</code> directory so that your end-users do not need
<a href="https://github.com/sunaku/md2man">md2man</a> installed in order to view the manual pages you've embedded therein!
There are also sub-tasks to build manual pages individually as <a href="http://troff.org">roff</a> or HTML.</p><p>If you're using Bundler, this task also hooks into its gem packaging tasks and
-ensures that your UNIX manual pages are pre-built and packaged into your gem:</p>
-<pre><code class="shell">bundle exec rake build
+ensures that your UNIX manual pages are pre-built and packaged into your gem:</p><pre><code>bundle exec rake build
gem spec pkg/*.gem | fgrep man/man
</code></pre>
<h2 id="license"><a name="license" href="#license" class="md2man-permalink" title="permalink"></a>License</h2><p>Released under the ISC license. See the LICENSE file for details.</p></div></body>
</html>