binman 5.0.1 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.markdown +471 -238
- data/VERSION.markdown +40 -8
- data/bin/binman +17 -71
- data/bin/binman-help +208 -0
- data/bin/binman-html +28 -0
- data/bin/binman-rake +11 -8
- data/bin/binman-roff +28 -0
- data/bin/binman-show +193 -0
- data/bin/binman-text +105 -0
- data/binman.gemspec +4 -4
- data/lib/binman.rb +8 -8
- data/lib/binman/rakefile.rb +2 -2
- data/lib/binman/version.rb +1 -1
- data/man/index.html +3 -3
- data/man/man0/README.html +488 -253
- data/man/man0/VERSION.html +44 -23
- data/man/man1/binman-help.1 +215 -0
- data/man/man1/binman-help.1.html +106 -0
- data/man/man1/binman-html.1 +18 -0
- data/man/man1/binman-html.1.html +12 -0
- data/man/man1/binman-rake.1 +9 -10
- data/man/man1/binman-rake.1.html +8 -8
- data/man/man1/binman-roff.1 +23 -0
- data/man/man1/binman-roff.1.html +12 -0
- data/man/man1/binman-show.1 +219 -0
- data/man/man1/binman-show.1.html +104 -0
- data/man/man1/binman-text.1 +129 -0
- data/man/man1/binman-text.1.html +55 -0
- data/man/man1/binman.1 +22 -111
- data/man/man1/binman.1.html +7 -47
- data/man/man5/md2man.5 +219 -0
- data/man/man5/md2man.5.html +140 -0
- data/man/man5/md2man.5.markdown +190 -0
- data/man/style.css +217 -1
- metadata +28 -7
- data/EXAMPLE.png +0 -0
- data/man/man0/EXAMPLE.png +0 -1
data/man/man0/VERSION.html
CHANGED
@@ -2,12 +2,36 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<meta charset="utf-8" />
|
5
|
-
<meta name="generator" content="md2man 5.0
|
6
|
-
<title>VERSION</title>
|
5
|
+
<meta name="generator" content="md2man 5.1.0 https://github.com/sunaku/md2man" />
|
6
|
+
<title>VERSION — binman</title>
|
7
7
|
<link rel="stylesheet" href="../style.css"/>
|
8
8
|
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
|
9
9
|
</head>
|
10
|
-
<body><div class="navbar"><div class="navbar-inner"><span class="brand"><a href="../index.html#man0">man0</a>/VERSION</span></div></div><div class="container-fluid"><h2 id="version-5-0-
|
10
|
+
<body><div class="navbar"><div class="navbar-inner"><span class="brand"><a href="../index.html#man0">man0</a>/VERSION</span></div></div><div class="container-fluid"><h2 id="version-5-1-0-2016-02-28">Version 5.1.0 (2016-02-28)<a name="version-5-1-0-2016-02-28" href="#version-5-1-0-2016-02-28" class="md2man-permalink" title="permalink"></a></h2><p>This release splits <a class="md2man-reference" href="../man1/binman.1.html">binman(1)</a> into pieces and improves the documentation.</p><h3 id="minor">Minor:<a name="minor" href="#minor" class="md2man-permalink" title="permalink"></a></h3>
|
11
|
+
<ul>
|
12
|
+
<li><p><a class="md2man-reference" href="../man1/binman.1.html">binman(1)</a> is now deprecated, to be removed in the next major version.
|
13
|
+
Please run the new binman-* programs, listed below, directly instead.</p></li>
|
14
|
+
<li><p>Split <a class="md2man-reference" href="../man1/binman.1.html">binman(1)</a> commands into independent programs:</p>
|
15
|
+
<ul>
|
16
|
+
<li><a class="md2man-reference" href="../man1/binman-help.1.html">binman-help(1)</a> - add help options to your program</li>
|
17
|
+
<li><a class="md2man-reference" href="../man1/binman-html.1.html">binman-html(1)</a> - HTML manpage from header comment</li>
|
18
|
+
<li><a class="md2man-reference" href="../man1/binman-rake.1.html">binman-rake(1)</a> - run <a class="md2man-reference">rake(1)</a> tasks from command line</li>
|
19
|
+
<li><a class="md2man-reference" href="../man1/binman-roff.1.html">binman-roff(1)</a> - UNIX manpage from header comment</li>
|
20
|
+
<li><a class="md2man-reference" href="../man1/binman-show.1.html">binman-show(1)</a> - show manpage from header comment</li>
|
21
|
+
<li><a class="md2man-reference" href="../man1/binman-text.1.html">binman-text(1)</a> - extract embedded manpage sources</li>
|
22
|
+
</ul></li>
|
23
|
+
<li><p><a class="md2man-reference" href="../man1/binman-rake.1.html">binman-rake(1)</a>: allow task names without namespace.</p><p>You can now run <code>binman-rake man</code> instead of <code>binman-rake binman:man</code>,
|
24
|
+
and similarly <code>binman-rake web</code> instead of <code>binman-rake binman:web</code>,
|
25
|
+
and similarly <code>binman-rake mkd</code> instead of <code>binman-rake binman:mkd</code>.</p></li>
|
26
|
+
</ul>
|
27
|
+
<h3 id="patch">Patch:<a name="patch" href="#patch" class="md2man-permalink" title="permalink"></a></h3>
|
28
|
+
<ul>
|
29
|
+
<li><p>README: an epic revision; add copy of <a class="md2man-reference" href="../man5/md2man.5.html">md2man(5)</a>.</p></li>
|
30
|
+
<li><p>README: add dasht manual pages to examples section.</p></li>
|
31
|
+
<li><p>Clarify optionalness of <em>PATTERN</em> in <code>--help</code> option.</p></li>
|
32
|
+
<li><p>Upgrade to md2man version 5.1.</p></li>
|
33
|
+
</ul>
|
34
|
+
<h2 id="version-5-0-1-2016-02-13">Version 5.0.1 (2016-02-13)<a name="version-5-0-1-2016-02-13" href="#version-5-0-1-2016-02-13" class="md2man-permalink" title="permalink"></a></h2><h3 id="major">Major:<a name="major" href="#major" class="md2man-permalink" title="permalink"></a></h3>
|
11
35
|
<ul>
|
12
36
|
<li><p>Rename <code>binman snip</code> command to <code>binman text</code>.</p></li>
|
13
37
|
<li><p>Rename <code>binman conv</code> command to <code>binman roff</code> and make it operate on a bin
|
@@ -20,11 +44,7 @@ Windows where there is no <a class="md2man-reference">man(1)</a> reader, but a w
|
|
20
44
|
<li><p>When a HTML manual page is shown, <code>binman</code> now blocks until the launched
|
21
45
|
web browser exits. Previously, it used to exit immediately (nonblocking).</p></li>
|
22
46
|
</ul>
|
23
|
-
<h2 id="version-4-2-1-2016-02-12">Version 4.2.1 (2016-02-12)<a name="version-4-2-1-2016-02-12" href="#version-4-2-1-2016-02-12" class="md2man-permalink" title="permalink"></a></h2><h3 id="
|
24
|
-
<ul>
|
25
|
-
<li><p>Failure when <code>binman show</code> is given input on STDIN.</p><p>binman.rb:51:in `basename': no implicit conversion of IO into String (TypeError)</p></li>
|
26
|
-
</ul>
|
27
|
-
<h2 id="version-4-2-0-2016-02-12">Version 4.2.0 (2016-02-12)<a name="version-4-2-0-2016-02-12" href="#version-4-2-0-2016-02-12" class="md2man-permalink" title="permalink"></a></h2><h3 id="minor">Minor:<a name="minor" href="#minor" class="md2man-permalink" title="permalink"></a></h3>
|
47
|
+
<h2 id="version-4-2-1-2016-02-12">Version 4.2.1 (2016-02-12)<a name="version-4-2-1-2016-02-12" href="#version-4-2-1-2016-02-12" class="md2man-permalink" title="permalink"></a></h2><h3 id="minor-1">Minor:<a name="minor-1" href="#minor-1" class="md2man-permalink" title="permalink"></a></h3>
|
28
48
|
<ul>
|
29
49
|
<li>Add <code>binman:mkd</code> rake task to extract <code>man/man1/*.1.markdown</code> files.</li>
|
30
50
|
</ul>
|
@@ -35,12 +55,13 @@ it ignores any man page files generated dynamically after the require().</p><p>T
|
|
35
55
|
every time afresh, so that such dynamically generated files are handled.</p></li>
|
36
56
|
<li><p>Failure when <code>binman help</code> is called without ARGV.</p><p>binman.rb:63:in <code>help': undefined method</code>index' for nil:NilClass (NoMethodError)</p></li>
|
37
57
|
<li><p>Failure when <code>binman show</code> is called without ARGV.</p><p>binman.rb:47:in `basename': no implicit conversion of IO into String (TypeError)</p></li>
|
58
|
+
<li><p>Failure when <code>binman show</code> is given input on STDIN.</p><p>binman.rb:51:in `basename': no implicit conversion of IO into String (TypeError)</p></li>
|
38
59
|
</ul>
|
39
|
-
<h2 id="version-4-1-0-2016-02-10">Version 4.1.0 (2016-02-10)<a name="version-4-1-0-2016-02-10" href="#version-4-1-0-2016-02-10" class="md2man-permalink" title="permalink"></a></h2><h3 id="minor-
|
60
|
+
<h3 id="patch-2">Patch:<a name="patch-2" href="#patch-2" class="md2man-permalink" title="permalink"></a></h3><h2 id="version-4-1-0-2016-02-10">Version 4.1.0 (2016-02-10)<a name="version-4-1-0-2016-02-10" href="#version-4-1-0-2016-02-10" class="md2man-permalink" title="permalink"></a></h2><h3 id="minor-2">Minor:<a name="minor-2" href="#minor-2" class="md2man-permalink" title="permalink"></a></h3>
|
40
61
|
<ul>
|
41
62
|
<li>Print path of HTML man page to STDOUT when launching browser.</li>
|
42
63
|
</ul>
|
43
|
-
<h3 id="patch-
|
64
|
+
<h3 id="patch-3">Patch:<a name="patch-3" href="#patch-3" class="md2man-permalink" title="permalink"></a></h3>
|
44
65
|
<ul>
|
45
66
|
<li><p>Revert "ensure 'binman:web' task works the first time thru".</p><p>This reverts commit dd0511e78e02546cac4903b5c6de6243607a8bba,
|
46
67
|
which was causing the following error under Ruby 2.3.0p0.</p><dl><dd>% rake build
|
@@ -68,7 +89,7 @@ exit 1</dd></dl></li>
|
|
68
89
|
<li><p>Upgrade to md2man 4.0, which no longer expands cross references in code
|
69
90
|
spans and code blocks. Your manuals might be rendered differently now.</p></li>
|
70
91
|
</ul>
|
71
|
-
<h2 id="version-3-4-1-2014-07-01">Version 3.4.1 (2014-07-01)<a name="version-3-4-1-2014-07-01" href="#version-3-4-1-2014-07-01" class="md2man-permalink" title="permalink"></a></h2><p>This release fixes the help options' REGEXP argument under non-Debian systems.</p><h3 id="patch-
|
92
|
+
<h2 id="version-3-4-1-2014-07-01">Version 3.4.1 (2014-07-01)<a name="version-3-4-1-2014-07-01" href="#version-3-4-1-2014-07-01" class="md2man-permalink" title="permalink"></a></h2><p>This release fixes the help options' REGEXP argument under non-Debian systems.</p><h3 id="patch-4">Patch:<a name="patch-4" href="#patch-4" class="md2man-permalink" title="permalink"></a></h3>
|
72
93
|
<ul>
|
73
94
|
<li><p><a class="md2man-reference">pager(1)</a> isn't a universal command: CentOS uses <code>less -is</code> instead.</p></li>
|
74
95
|
<li><p>Silence <a class="md2man-reference">man(1)</a> stderr when displaying dynamically extracted manual.</p></li>
|
@@ -79,7 +100,7 @@ spans and code blocks. Your manuals might be rendered differently now.</p></li>
|
|
79
100
|
<li><p>Document REGEXP argument for help options in <code>bin/*</code>.</p></li>
|
80
101
|
<li><p>Refer to REGEXP argument as PATTERN like less does.</p></li>
|
81
102
|
</ul>
|
82
|
-
<h2 id="version-3-4-0-2014-06-29">Version 3.4.0 (2014-06-29)<a name="version-3-4-0-2014-06-29" href="#version-3-4-0-2014-06-29" class="md2man-permalink" title="permalink"></a></h2><h3 id="minor-
|
103
|
+
<h2 id="version-3-4-0-2014-06-29">Version 3.4.0 (2014-06-29)<a name="version-3-4-0-2014-06-29" href="#version-3-4-0-2014-06-29" class="md2man-permalink" title="permalink"></a></h2><h3 id="minor-3">Minor:<a name="minor-3" href="#minor-3" class="md2man-permalink" title="permalink"></a></h3>
|
83
104
|
<ul>
|
84
105
|
<li><p>GH-3: add optional regexp argument to <code>-h</code>/<code>--help</code> to search in <a class="md2man-reference">man(1)</a>.</p><p>The <code>-h</code> and <code>--help</code> options in <code>BinMan.help()</code> can now be optionally
|
85
106
|
followed by a regular expression argument that specifies text to search
|
@@ -98,18 +119,18 @@ regular expression argument can now also be passed into <code>BinMan.show()</cod
|
|
98
119
|
</ul>
|
99
120
|
<h2 id="version-3-3-2-2013-08-30">Version 3.3.2 (2013-08-30)<a name="version-3-3-2-2013-08-30" href="#version-3-3-2-2013-08-30" class="md2man-permalink" title="permalink"></a></h2><p>Patch:</p>
|
100
121
|
<ul>
|
101
|
-
<li><p>Rescue error when designated opener is not found:</p><pre><code>$ binman -h
|
102
|
-
/gems/opener-0.1.0/lib/opener.rb:97:in `spawn
|
103
|
-
from /gems/opener-0.1.0/lib/opener.rb:97:in `spawn
|
104
|
-
from /gems/binman-3.3.1/lib/binman.rb:57:in `block in show
|
105
|
-
from /gems/binman-3.3.1/lib/binman.rb:55:in `each
|
106
|
-
from /gems/binman-3.3.1/lib/binman.rb:55:in `show
|
107
|
-
from /gems/binman-3.3.1/lib/binman.rb:88:in `help
|
108
|
-
from /gems/binman-3.3.1/bin/binman:106:in `<top (required)>
|
109
|
-
from /bin/binman:23:in `load
|
110
|
-
from /bin/binman:23:in `<main>
|
122
|
+
<li><p>Rescue error when designated opener is not found:</p><pre class="highlight plaintext"><code>$ binman -h
|
123
|
+
/gems/opener-0.1.0/lib/opener.rb:97:in `spawn': No such file or directory - xdg-open (Errno::ENOENT)
|
124
|
+
from /gems/opener-0.1.0/lib/opener.rb:97:in `spawn'
|
125
|
+
from /gems/binman-3.3.1/lib/binman.rb:57:in `block in show'
|
126
|
+
from /gems/binman-3.3.1/lib/binman.rb:55:in `each'
|
127
|
+
from /gems/binman-3.3.1/lib/binman.rb:55:in `show'
|
128
|
+
from /gems/binman-3.3.1/lib/binman.rb:88:in `help'
|
129
|
+
from /gems/binman-3.3.1/bin/binman:106:in `<top (required)>'
|
130
|
+
from /bin/binman:23:in `load'
|
131
|
+
from /bin/binman:23:in `<main>'
|
111
132
|
</code></pre></li>
|
112
|
-
<li><p>Fix an undefined local variable or method error:</p><pre><code>binman: undefined local variable or method `library
|
133
|
+
<li><p>Fix an undefined local variable or method error:</p><pre class="highlight plaintext"><code>binman: undefined local variable or method `library' for BinMan:Module
|
113
134
|
</code></pre></li>
|
114
135
|
</ul>
|
115
136
|
<p>Other:</p>
|
@@ -0,0 +1,215 @@
|
|
1
|
+
.TH BINMAN\-HELP 1 2016\-02\-28 5.1.0
|
2
|
+
.SH NAME
|
3
|
+
.PP
|
4
|
+
binman\-help \- add help options to your program
|
5
|
+
.SH SYNOPSIS
|
6
|
+
.PP
|
7
|
+
\fB\fCbinman\-help\fR \fIFILE\fP ... [\fB\fC\-h\fR|\fB\fC\-\-help\fR [\fIPATTERN\fP]] ... [\fB\fC\-\-\fR] ...
|
8
|
+
.SH DESCRIPTION
|
9
|
+
.PP
|
10
|
+
If the given argument sequence contains \fB\fC\-h\fR or \fB\fC\-\-help\fR, except after \fB\fC\-\-\fR,
|
11
|
+
then this program displays the given \fIFILE\fP\&'s "embedded manpage source",
|
12
|
+
described in
|
13
|
+
.BR binman-text (1),
|
14
|
+
and then terminates with exit status \fB\fC0\fR\&.
|
15
|
+
Otherwise, this program terminates with the nonzero exit status \fB\fC111\fR\&.
|
16
|
+
.SS Examples
|
17
|
+
.PP
|
18
|
+
See "Embedded manpage sources" in
|
19
|
+
.BR binman-text (1)
|
20
|
+
for header comment syntax.
|
21
|
+
.SS From a shell script
|
22
|
+
.PP
|
23
|
+
.RS
|
24
|
+
.nf
|
25
|
+
#!/usr/bin/sh
|
26
|
+
# your program's manual page goes here
|
27
|
+
|
28
|
+
binman\-help "$0" "$@" && exit
|
29
|
+
.fi
|
30
|
+
.RE
|
31
|
+
.SS From a Ruby script
|
32
|
+
.PP
|
33
|
+
.RS
|
34
|
+
.nf
|
35
|
+
#!/usr/bin/env ruby
|
36
|
+
# your program's manual page goes here
|
37
|
+
|
38
|
+
require 'binman'
|
39
|
+
BinMan.help
|
40
|
+
.fi
|
41
|
+
.RE
|
42
|
+
.PP
|
43
|
+
You can also specify your program's source file encoding above the manual:
|
44
|
+
.PP
|
45
|
+
.RS
|
46
|
+
.nf
|
47
|
+
#!/usr/bin/env ruby
|
48
|
+
# \-*\- coding: utf\-8 \-*\-
|
49
|
+
# your program's manual page goes here
|
50
|
+
.fi
|
51
|
+
.RE
|
52
|
+
.PP
|
53
|
+
You can also write the manual as a multi\-line Ruby comment:
|
54
|
+
.PP
|
55
|
+
.RS
|
56
|
+
.nf
|
57
|
+
#!/usr/bin/env ruby
|
58
|
+
=begin
|
59
|
+
your program's manual page goes here
|
60
|
+
=end
|
61
|
+
.fi
|
62
|
+
.RE
|
63
|
+
.PP
|
64
|
+
You can also specify your program's source file encoding above the manual:
|
65
|
+
.PP
|
66
|
+
.RS
|
67
|
+
.nf
|
68
|
+
#!/usr/bin/env ruby
|
69
|
+
# \-*\- coding: utf\-8 \-*\-
|
70
|
+
=begin
|
71
|
+
your program's manual page goes here
|
72
|
+
=end
|
73
|
+
.fi
|
74
|
+
.RE
|
75
|
+
.SS From a Perl script
|
76
|
+
.PP
|
77
|
+
.RS
|
78
|
+
.nf
|
79
|
+
#!/usr/bin/env perl
|
80
|
+
# your program's manual page goes here
|
81
|
+
|
82
|
+
system('binman\-help', __FILE__, @ARGV) == 0 and exit;
|
83
|
+
.fi
|
84
|
+
.RE
|
85
|
+
.PP
|
86
|
+
You can also write the manual as a multi\-line Ruby comment after \fB\fC__END__\fR:
|
87
|
+
.PP
|
88
|
+
.RS
|
89
|
+
.nf
|
90
|
+
#!/usr/bin/env perl
|
91
|
+
print "your program's code goes here";
|
92
|
+
__END__
|
93
|
+
=begin
|
94
|
+
your program's manual page goes here
|
95
|
+
=end
|
96
|
+
.fi
|
97
|
+
.RE
|
98
|
+
.SS From a Python script
|
99
|
+
.PP
|
100
|
+
.RS
|
101
|
+
.nf
|
102
|
+
#!/usr/bin/env python
|
103
|
+
# your program's manual page goes here
|
104
|
+
|
105
|
+
import sys, subprocess
|
106
|
+
|
107
|
+
subprocess.call(['binman\-help', __file__] + sys.argv) == 0 and sys.exit()
|
108
|
+
.fi
|
109
|
+
.RE
|
110
|
+
.PP
|
111
|
+
You can also specify your program's source file encoding above the manual:
|
112
|
+
.PP
|
113
|
+
.RS
|
114
|
+
.nf
|
115
|
+
#!/usr/bin/env python
|
116
|
+
# \-*\- coding: utf\-8 \-*\-
|
117
|
+
# your program's manual page goes here
|
118
|
+
.fi
|
119
|
+
.RE
|
120
|
+
.PP
|
121
|
+
You can also write the manual as a multi\-line Ruby comment inside a docstring:
|
122
|
+
.PP
|
123
|
+
.RS
|
124
|
+
.nf
|
125
|
+
#!/usr/bin/env python
|
126
|
+
"""
|
127
|
+
=begin
|
128
|
+
your program's manual page goes here
|
129
|
+
=end
|
130
|
+
"""
|
131
|
+
.fi
|
132
|
+
.RE
|
133
|
+
.PP
|
134
|
+
You can also specify your program's source file encoding above the manual:
|
135
|
+
.PP
|
136
|
+
.RS
|
137
|
+
.nf
|
138
|
+
#!/usr/bin/env python
|
139
|
+
# \-*\- coding: utf\-8 \-*\-
|
140
|
+
"""
|
141
|
+
=begin
|
142
|
+
your program's manual page goes here
|
143
|
+
=end
|
144
|
+
"""
|
145
|
+
.fi
|
146
|
+
.RE
|
147
|
+
.SS From an AWK script
|
148
|
+
.PP
|
149
|
+
The technique for determining current AWK script file name comes from here \[la]http://www.mombu.com/programming/programming/t-the-name-of-script-itself-2040784-print.html\[ra]\&.
|
150
|
+
.PP
|
151
|
+
.RS
|
152
|
+
.nf
|
153
|
+
#!/usr/bin/awk \-f
|
154
|
+
# your program's manual page goes here
|
155
|
+
|
156
|
+
BEGIN {getline c <"/proc/self/cmdline"; sub(".*\-f\\0"," ",c); gsub("\\0"," ",c);
|
157
|
+
if(system("binman\-help" c) == 0){ exit }}
|
158
|
+
.fi
|
159
|
+
.RE
|
160
|
+
.SS From a Tcl script
|
161
|
+
.PP
|
162
|
+
.RS
|
163
|
+
.nf
|
164
|
+
#!/usr/bin/env tclsh
|
165
|
+
# your program's manual page goes here
|
166
|
+
|
167
|
+
if {![catch {exec \-\- >/dev/tty binman\-help $argv0 {*}$argv}]} {exit}
|
168
|
+
.fi
|
169
|
+
.RE
|
170
|
+
.PP
|
171
|
+
You can also write the manual as a multi\-line Ruby comment inside an \fB\fCif 0\fR:
|
172
|
+
.PP
|
173
|
+
.RS
|
174
|
+
.nf
|
175
|
+
#!/usr/bin/env tclsh
|
176
|
+
if 0 {
|
177
|
+
=begin
|
178
|
+
your program's manual page goes here
|
179
|
+
=end
|
180
|
+
}
|
181
|
+
.fi
|
182
|
+
.RE
|
183
|
+
.SS From a Node.js script
|
184
|
+
.PP
|
185
|
+
.RS
|
186
|
+
.nf
|
187
|
+
/*
|
188
|
+
=begin
|
189
|
+
your program's manual page goes here
|
190
|
+
=end
|
191
|
+
*/
|
192
|
+
|
193
|
+
var exec = require('child_process').exec;
|
194
|
+
exec(['>/dev/tty', 'binman\-help', __filename].concat(process.argv).
|
195
|
+
join(' '), function(error){ if (error === null){ process.exit(); } });
|
196
|
+
.fi
|
197
|
+
.RE
|
198
|
+
.SH OPTIONS
|
199
|
+
.TP
|
200
|
+
\fB\fC\-h\fR [\fIPATTERN\fP], \fB\fC\-\-help\fR [\fIPATTERN\fP]
|
201
|
+
Display manpage and optionally search for \fIPATTERN\fP regular expression.
|
202
|
+
.SH EXIT STATUS
|
203
|
+
.TP
|
204
|
+
0
|
205
|
+
Arguments contained help options so manpage was displayed.
|
206
|
+
.TP
|
207
|
+
111
|
208
|
+
Arguments lacked help options so manpage was not displayed.
|
209
|
+
.SH SEE ALSO
|
210
|
+
.PP
|
211
|
+
.BR binman-text (1),
|
212
|
+
.BR binman-roff (1),
|
213
|
+
.BR binman-html (1),
|
214
|
+
.BR binman-show (1),
|
215
|
+
.BR binman (1)
|
@@ -0,0 +1,106 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8" />
|
5
|
+
<meta name="generator" content="md2man 5.1.0 https://github.com/sunaku/md2man" />
|
6
|
+
<title>binman-help(1) — add help options to your program</title>
|
7
|
+
<link rel="stylesheet" href="../style.css"/>
|
8
|
+
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
|
9
|
+
</head>
|
10
|
+
<body><div class="navbar"><div class="navbar-inner"><span class="brand"><a href="../index.html#man1">man1</a>/binman-help.1</span></div></div><div class="container-fluid"><h1 id="binman-help-1-2016-02-28-5-1-0"><span class="md2man-title">BINMAN-HELP</span> <span class="md2man-section">1</span> <span class="md2man-date">2016-02-28</span> <span class="md2man-source">5.1.0</span><a name="binman-help-1-2016-02-28-5-1-0" href="#binman-help-1-2016-02-28-5-1-0" class="md2man-permalink" title="permalink"></a></h1><h2 id="name">NAME<a name="name" href="#name" class="md2man-permalink" title="permalink"></a></h2><p>binman-help - add help options to your program</p><h2 id="synopsis">SYNOPSIS<a name="synopsis" href="#synopsis" class="md2man-permalink" title="permalink"></a></h2><p><code>binman-help</code> <em>FILE</em> ... [<code>-h</code>|<code>--help</code> [<em>PATTERN</em>]] ... [<code>--</code>] ...</p><h2 id="description">DESCRIPTION<a name="description" href="#description" class="md2man-permalink" title="permalink"></a></h2><p>If the given argument sequence contains <code>-h</code> or <code>--help</code>, except after <code>--</code>,
|
11
|
+
then this program displays the given <em>FILE</em>'s "embedded manpage source",
|
12
|
+
described in <a class="md2man-reference" href="../man1/binman-text.1.html">binman-text(1)</a>, and then terminates with exit status <code>0</code>.
|
13
|
+
Otherwise, this program terminates with the nonzero exit status <code>111</code>.</p><h3 id="examples">Examples<a name="examples" href="#examples" class="md2man-permalink" title="permalink"></a></h3><p>See "Embedded manpage sources" in <a class="md2man-reference" href="../man1/binman-text.1.html">binman-text(1)</a> for header comment syntax.</p><h4 id="from-a-shell-script">From a shell script<a name="from-a-shell-script" href="#from-a-shell-script" class="md2man-permalink" title="permalink"></a></h4><pre class="highlight shell"><code><span class="c">#!/usr/bin/sh</span>
|
14
|
+
<span class="c"># your program's manual page goes here</span>
|
15
|
+
|
16
|
+
binman-help <span class="s2">"</span><span class="nv">$0</span><span class="s2">"</span> <span class="s2">"</span><span class="nv">$@</span><span class="s2">"</span> <span class="o">&&</span> <span class="nb">exit</span>
|
17
|
+
</code></pre>
|
18
|
+
<h4 id="from-a-ruby-script">From a Ruby script<a name="from-a-ruby-script" href="#from-a-ruby-script" class="md2man-permalink" title="permalink"></a></h4><pre class="highlight ruby"><code><span class="c1">#!/usr/bin/env ruby</span>
|
19
|
+
<span class="c1"># your program's manual page goes here</span>
|
20
|
+
|
21
|
+
<span class="nb">require</span> <span class="s1">'binman'</span>
|
22
|
+
<span class="no">BinMan</span><span class="p">.</span><span class="nf">help</span>
|
23
|
+
</code></pre>
|
24
|
+
<p>You can also specify your program's source file encoding above the manual:</p><pre class="highlight ruby"><code><span class="c1">#!/usr/bin/env ruby</span>
|
25
|
+
<span class="c1"># -*- coding: utf-8 -*-</span>
|
26
|
+
<span class="c1"># your program's manual page goes here</span>
|
27
|
+
</code></pre>
|
28
|
+
<p>You can also write the manual as a multi-line Ruby comment:</p><pre class="highlight ruby"><code><span class="c1">#!/usr/bin/env ruby</span>
|
29
|
+
<span class="cm">=begin
|
30
|
+
your program's manual page goes here
|
31
|
+
=end</span>
|
32
|
+
</code></pre>
|
33
|
+
<p>You can also specify your program's source file encoding above the manual:</p><pre class="highlight ruby"><code><span class="c1">#!/usr/bin/env ruby</span>
|
34
|
+
<span class="c1"># -*- coding: utf-8 -*-</span>
|
35
|
+
<span class="cm">=begin
|
36
|
+
your program's manual page goes here
|
37
|
+
=end</span>
|
38
|
+
</code></pre>
|
39
|
+
<h4 id="from-a-perl-script">From a Perl script<a name="from-a-perl-script" href="#from-a-perl-script" class="md2man-permalink" title="permalink"></a></h4><pre class="highlight perl"><code><span class="c1">#!/usr/bin/env perl</span>
|
40
|
+
<span class="c1"># your program's manual page goes here</span>
|
41
|
+
|
42
|
+
<span class="nb">system</span><span class="p">(</span><span class="s">'binman-help'</span><span class="p">,</span> <span class="nv">__FILE__</span><span class="p">,</span> <span class="nv">@ARGV</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span> <span class="ow">and</span> <span class="nb">exit</span><span class="p">;</span>
|
43
|
+
</code></pre>
|
44
|
+
<p>You can also write the manual as a multi-line Ruby comment after <code>__END__</code>:</p><pre class="highlight perl"><code><span class="c1">#!/usr/bin/env perl</span>
|
45
|
+
<span class="k">print</span> <span class="s">"your program's code goes here"</span><span class="p">;</span>
|
46
|
+
<span class="cp">__END__
|
47
|
+
=begin
|
48
|
+
your program's manual page goes here
|
49
|
+
=end
|
50
|
+
</span></code></pre>
|
51
|
+
<h4 id="from-a-python-script">From a Python script<a name="from-a-python-script" href="#from-a-python-script" class="md2man-permalink" title="permalink"></a></h4><pre class="highlight python"><code><span class="c">#!/usr/bin/env python</span>
|
52
|
+
<span class="c"># your program's manual page goes here</span>
|
53
|
+
|
54
|
+
<span class="kn">import</span> <span class="nn">sys</span><span class="o">,</span> <span class="nn">subprocess</span>
|
55
|
+
|
56
|
+
<span class="n">subprocess</span><span class="o">.</span><span class="n">call</span><span class="p">([</span><span class="s">'binman-help'</span><span class="p">,</span> <span class="n">__file__</span><span class="p">]</span> <span class="o">+</span> <span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span> <span class="ow">and</span> <span class="n">sys</span><span class="o">.</span><span class="nb">exit</span><span class="p">()</span>
|
57
|
+
</code></pre>
|
58
|
+
<p>You can also specify your program's source file encoding above the manual:</p><pre class="highlight python"><code><span class="c">#!/usr/bin/env python</span>
|
59
|
+
<span class="c"># -*- coding: utf-8 -*-</span>
|
60
|
+
<span class="c"># your program's manual page goes here</span>
|
61
|
+
</code></pre>
|
62
|
+
<p>You can also write the manual as a multi-line Ruby comment inside a docstring:</p><pre class="highlight python"><code><span class="c">#!/usr/bin/env python</span>
|
63
|
+
<span class="s">"""
|
64
|
+
=begin
|
65
|
+
your program's manual page goes here
|
66
|
+
=end
|
67
|
+
"""</span>
|
68
|
+
</code></pre>
|
69
|
+
<p>You can also specify your program's source file encoding above the manual:</p><pre class="highlight python"><code><span class="c">#!/usr/bin/env python</span>
|
70
|
+
<span class="c"># -*- coding: utf-8 -*-</span>
|
71
|
+
<span class="s">"""
|
72
|
+
=begin
|
73
|
+
your program's manual page goes here
|
74
|
+
=end
|
75
|
+
"""</span>
|
76
|
+
</code></pre>
|
77
|
+
<h4 id="from-an-awk-script">From an AWK script<a name="from-an-awk-script" href="#from-an-awk-script" class="md2man-permalink" title="permalink"></a></h4><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 class="highlight plaintext"><code>#!/usr/bin/awk -f
|
78
|
+
# your program's manual page goes here
|
79
|
+
|
80
|
+
BEGIN {getline c <"/proc/self/cmdline"; sub(".*-f\0"," ",c); gsub("\0"," ",c);
|
81
|
+
if(system("binman-help" c) == 0){ exit }}
|
82
|
+
</code></pre>
|
83
|
+
<h4 id="from-a-tcl-script">From a Tcl script<a name="from-a-tcl-script" href="#from-a-tcl-script" class="md2man-permalink" title="permalink"></a></h4><pre class="highlight tcl"><code><span class="c1">#!/usr/bin/env tclsh</span>
|
84
|
+
<span class="c1"># your program's manual page goes here</span>
|
85
|
+
|
86
|
+
<span class="k">if</span> <span class="p">{</span>!<span class="p">[</span><span class="k">catch</span> <span class="p">{</span><span class="nb">exec</span> -- >/dev/tty binman-help <span class="nv">$argv0</span> <span class="k">{*}</span><span class="nv">$argv</span><span class="p">}]}</span> <span class="p">{</span><span class="nb">exit</span><span class="p">}</span>
|
87
|
+
</code></pre>
|
88
|
+
<p>You can also write the manual as a multi-line Ruby comment inside an <code>if 0</code>:</p><pre class="highlight tcl"><code><span class="c1">#!/usr/bin/env tclsh</span>
|
89
|
+
<span class="k">if</span> 0 <span class="p">{</span>
|
90
|
+
=begin
|
91
|
+
your program's manual page goes here
|
92
|
+
=end
|
93
|
+
<span class="p">}</span>
|
94
|
+
</code></pre>
|
95
|
+
<h4 id="from-a-node-js-script">From a Node.js script<a name="from-a-node-js-script" href="#from-a-node-js-script" class="md2man-permalink" title="permalink"></a></h4><pre class="highlight javascript"><code><span class="cm">/*
|
96
|
+
=begin
|
97
|
+
your program's manual page goes here
|
98
|
+
=end
|
99
|
+
*/</span>
|
100
|
+
|
101
|
+
<span class="kd">var</span> <span class="nx">exec</span> <span class="o">=</span> <span class="nx">require</span><span class="p">(</span><span class="s1">'child_process'</span><span class="p">).</span><span class="nx">exec</span><span class="p">;</span>
|
102
|
+
<span class="nx">exec</span><span class="p">([</span><span class="s1">'>/dev/tty'</span><span class="p">,</span> <span class="s1">'binman-help'</span><span class="p">,</span> <span class="nx">__filename</span><span class="p">].</span><span class="nx">concat</span><span class="p">(</span><span class="nx">process</span><span class="p">.</span><span class="nx">argv</span><span class="p">).</span>
|
103
|
+
<span class="nx">join</span><span class="p">(</span><span class="s1">' '</span><span class="p">),</span> <span class="kd">function</span><span class="p">(</span><span class="nx">error</span><span class="p">){</span> <span class="k">if</span> <span class="p">(</span><span class="nx">error</span> <span class="o">===</span> <span class="kc">null</span><span class="p">){</span> <span class="nx">process</span><span class="p">.</span><span class="nx">exit</span><span class="p">();</span> <span class="p">}</span> <span class="p">});</span>
|
104
|
+
</code></pre>
|
105
|
+
<h2 id="options">OPTIONS<a name="options" href="#options" class="md2man-permalink" title="permalink"></a></h2><dl><dt><code>-h</code> [<em>PATTERN</em>], <code>--help</code> [<em>PATTERN</em>]</dt><dd>Display manpage and optionally search for <em>PATTERN</em> regular expression.</dd></dl><h2 id="exit-status">EXIT STATUS<a name="exit-status" href="#exit-status" class="md2man-permalink" title="permalink"></a></h2><dl><dt>0</dt><dd>Arguments contained help options so manpage was displayed.</dd></dl><dl><dt>111</dt><dd>Arguments lacked help options so manpage was not displayed.</dd></dl><h2 id="see-also">SEE ALSO<a name="see-also" href="#see-also" class="md2man-permalink" title="permalink"></a></h2><p><a class="md2man-reference" href="../man1/binman-text.1.html">binman-text(1)</a>, <a class="md2man-reference" href="../man1/binman-roff.1.html">binman-roff(1)</a>, <a class="md2man-reference" href="../man1/binman-html.1.html">binman-html(1)</a>, <a class="md2man-reference" href="../man1/binman-show.1.html">binman-show(1)</a>, <a class="md2man-reference" href="../man1/binman.1.html">binman(1)</a></p></div></body>
|
106
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
.TH BINMAN\-HTML 1 2016\-02\-28 5.1.0
|
2
|
+
.SH NAME
|
3
|
+
.PP
|
4
|
+
binman\-html \- HTML manpage from header comment
|
5
|
+
.SH SYNOPSIS
|
6
|
+
.PP
|
7
|
+
\fB\fCbinman\-html\fR [\fIOPTION\fP]... [\fIFILE\fP]
|
8
|
+
.SH DESCRIPTION
|
9
|
+
.PP
|
10
|
+
Extracts the "embedded manpage source", described in
|
11
|
+
.BR binman-text (1),
|
12
|
+
from the
|
13
|
+
given \fIFILE\fP or STDIN and transforms it into HTML for use in a web browser.
|
14
|
+
.SH SEE ALSO
|
15
|
+
.PP
|
16
|
+
.BR binman-text (1),
|
17
|
+
.BR binman-roff (1),
|
18
|
+
.BR binman (1)
|