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
@@ -0,0 +1,12 @@
|
|
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-html(1) — HTML manpage from header comment</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-html.1</span></div></div><div class="container-fluid"><h1 id="binman-html-1-2016-02-28-5-1-0"><span class="md2man-title">BINMAN-HTML</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-html-1-2016-02-28-5-1-0" href="#binman-html-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-html - HTML manpage from header comment</p><h2 id="synopsis">SYNOPSIS<a name="synopsis" href="#synopsis" class="md2man-permalink" title="permalink"></a></h2><p><code>binman-html</code> [<em>OPTION</em>]... [<em>FILE</em>]</p><h2 id="description">DESCRIPTION<a name="description" href="#description" class="md2man-permalink" title="permalink"></a></h2><p>Extracts the "embedded manpage source", described in <a class="md2man-reference" href="../man1/binman-text.1.html">binman-text(1)</a>, from the
|
11
|
+
given <em>FILE</em> or STDIN and transforms it into HTML for use in a web browser.</p><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.1.html">binman(1)</a></p></div></body>
|
12
|
+
</html>
|
data/man/man1/binman-rake.1
CHANGED
@@ -1,10 +1,9 @@
|
|
1
|
-
.TH BINMAN\-RAKE 1
|
1
|
+
.TH BINMAN\-RAKE 1 2016\-02\-28 5.1.0
|
2
2
|
.SH NAME
|
3
3
|
.PP
|
4
4
|
binman\-rake \- run
|
5
5
|
.BR rake (1)
|
6
|
-
tasks from
|
7
|
-
.BR binman (1)
|
6
|
+
tasks from command line
|
8
7
|
.SH SYNOPSIS
|
9
8
|
.PP
|
10
9
|
\fB\fCbinman\-rake\fR [\fIOPTION\fP]... [\fITASK\fP]...
|
@@ -27,15 +26,15 @@ If no \fITASK\fP is specified, then the \fB\fCbinman\fR task is run by default.
|
|
27
26
|
.SH TASKS
|
28
27
|
.TP
|
29
28
|
\fB\fCbinman\fR
|
30
|
-
Runs the \fB\fCbinman:man\fR and \fB\fCbinman:web\fR tasks, in that order.
|
29
|
+
Runs the \fB\fCbinman:mkd\fR, \fB\fCbinman:man\fR, and \fB\fCbinman:web\fR tasks, in that order.
|
31
30
|
.TP
|
32
|
-
\fB\fCbinman:mkd\fR
|
31
|
+
\fB\fCbinman:mkd\fR or \fB\fCmkd\fR
|
33
32
|
Extracts manual page sources embedded in scripts found in your \fB\fCbin/\fR
|
34
33
|
directory and saves them as \fB\fCman/man1/*.1.markdown\fR files, which can
|
35
34
|
then be rendered as HTML or UNIX manual pages using
|
36
35
|
.BR md2man-rake (1).
|
37
36
|
.TP
|
38
|
-
\fB\fCbinman:man\fR
|
37
|
+
\fB\fCbinman:man\fR or \fB\fCman\fR
|
39
38
|
Builds UNIX manual pages from scripts found in your \fB\fCbin/\fR directory.
|
40
39
|
It also runs the \fB\fCmd2man:man\fR task, provided by
|
41
40
|
.BR md2man-rake (1),
|
@@ -43,7 +42,7 @@ which
|
|
43
42
|
builds UNIX manual pages from \fB\fC*.markdown\fR, \fB\fC*.mkd\fR, and \fB\fC*.md\fR files
|
44
43
|
found in or beneath the \fB\fCman/\fR subdirectory in your working directory.
|
45
44
|
.TP
|
46
|
-
\fB\fCbinman:web\fR
|
45
|
+
\fB\fCbinman:web\fR or \fB\fCweb\fR
|
47
46
|
Builds HTML manual pages from scripts found in your \fB\fCbin/\fR directory.
|
48
47
|
It also runs the \fB\fCmd2man:web\fR task, provided by
|
49
48
|
.BR md2man-rake (1),
|
@@ -52,8 +51,8 @@ builds HTML manual pages from \fB\fC*.markdown\fR, \fB\fC*.mkd\fR, and \fB\fC*.m
|
|
52
51
|
found in or beneath the \fB\fCman/\fR subdirectory in your working directory.
|
53
52
|
.SH OPTIONS
|
54
53
|
.TP
|
55
|
-
\fB\fC\-h\fR [\
|
56
|
-
Show this help manual and search for \
|
54
|
+
\fB\fC\-h\fR [\fIPATTERN\fP], \fB\fC\-\-help\fR [\fIPATTERN\fP]
|
55
|
+
Show this help manual and optionally search for \fIPATTERN\fP regular expression.
|
57
56
|
.TP
|
58
57
|
\&...
|
59
58
|
Anything else is passed to
|
@@ -63,4 +62,4 @@ run \fB\fCrake \-\-help\fR for documentation.
|
|
63
62
|
.PP
|
64
63
|
.BR rake (1),
|
65
64
|
.BR binman (1),
|
66
|
-
.BR md2man-rake (1)
|
65
|
+
.BR md2man-rake (1)
|
data/man/man1/binman-rake.1.html
CHANGED
@@ -2,21 +2,21 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<meta charset="utf-8" />
|
5
|
-
<meta name="generator" content="md2man 5.0
|
6
|
-
<title>binman-rake(1) — run rake(1) tasks from
|
5
|
+
<meta name="generator" content="md2man 5.1.0 https://github.com/sunaku/md2man" />
|
6
|
+
<title>binman-rake(1) — run rake(1) tasks from command line</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#man1">man1</a>/binman-rake.1</span></div></div><div class="container-fluid"><h1 id="binman-rake-1-2016-02-
|
11
|
-
to create a special file named <code>Rakefile</code> that contains the following snippet:</p><pre><code>require
|
10
|
+
<body><div class="navbar"><div class="navbar-inner"><span class="brand"><a href="../index.html#man1">man1</a>/binman-rake.1</span></div></div><div class="container-fluid"><h1 id="binman-rake-1-2016-02-28-5-1-0"><span class="md2man-title">BINMAN-RAKE</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-rake-1-2016-02-28-5-1-0" href="#binman-rake-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-rake - run <a class="md2man-reference">rake(1)</a> tasks from command line</p><h2 id="synopsis">SYNOPSIS<a name="synopsis" href="#synopsis" class="md2man-permalink" title="permalink"></a></h2><p><code>binman-rake</code> [<em>OPTION</em>]... [<em>TASK</em>]...</p><h2 id="description">DESCRIPTION<a name="description" href="#description" class="md2man-permalink" title="permalink"></a></h2><p>This program lets you run <a class="md2man-reference">rake(1)</a> tasks provided by <a class="md2man-reference" href="../man1/binman.1.html">binman(1)</a> without having
|
11
|
+
to create a special file named <code>Rakefile</code> that contains the following snippet:</p><pre class="highlight plaintext"><code>require 'binman/rakefile'
|
12
12
|
</code></pre>
|
13
|
-
<p>If no <em>TASK</em> is specified, then the <code>binman</code> task is run by default.</p><h2 id="tasks">TASKS<a name="tasks" href="#tasks" class="md2man-permalink" title="permalink"></a></h2><dl><dt><code>binman</code></dt><dd>Runs the <code>binman:man</code
|
13
|
+
<p>If no <em>TASK</em> is specified, then the <code>binman</code> task is run by default.</p><h2 id="tasks">TASKS<a name="tasks" href="#tasks" class="md2man-permalink" title="permalink"></a></h2><dl><dt><code>binman</code></dt><dd>Runs the <code>binman:mkd</code>, <code>binman:man</code>, and <code>binman:web</code> tasks, in that order.</dd></dl><dl><dt><code>binman:mkd</code> or <code>mkd</code></dt><dd>Extracts manual page sources embedded in scripts found in your <code>bin/</code>
|
14
14
|
directory and saves them as <code>man/man1/*.1.markdown</code> files, which can
|
15
|
-
then be rendered as HTML or UNIX manual pages using <a class="md2man-reference">md2man-rake(1)</a>.</dd></dl><dl><dt><code>binman:man</code></dt><dd>Builds UNIX manual pages from scripts found in your <code>bin/</code> directory.
|
15
|
+
then be rendered as HTML or UNIX manual pages using <a class="md2man-reference">md2man-rake(1)</a>.</dd></dl><dl><dt><code>binman:man</code> or <code>man</code></dt><dd>Builds UNIX manual pages from scripts found in your <code>bin/</code> directory.
|
16
16
|
It also runs the <code>md2man:man</code> task, provided by <a class="md2man-reference">md2man-rake(1)</a>, which
|
17
17
|
builds UNIX manual pages from <code>*.markdown</code>, <code>*.mkd</code>, and <code>*.md</code> files
|
18
|
-
found in or beneath the <code>man/</code> subdirectory in your working directory.</dd></dl><dl><dt><code>binman:web</code></dt><dd>Builds HTML manual pages from scripts found in your <code>bin/</code> directory.
|
18
|
+
found in or beneath the <code>man/</code> subdirectory in your working directory.</dd></dl><dl><dt><code>binman:web</code> or <code>web</code></dt><dd>Builds HTML manual pages from scripts found in your <code>bin/</code> directory.
|
19
19
|
It also runs the <code>md2man:web</code> task, provided by <a class="md2man-reference">md2man-rake(1)</a>, which
|
20
20
|
builds HTML manual pages from <code>*.markdown</code>, <code>*.mkd</code>, and <code>*.md</code> files
|
21
|
-
found in or beneath the <code>man/</code> subdirectory in your working directory.</dd></dl><h2 id="options">OPTIONS<a name="options" href="#options" class="md2man-permalink" title="permalink"></a></h2><dl><dt><code>-h</code> [<em>
|
21
|
+
found in or beneath the <code>man/</code> subdirectory in your working directory.</dd></dl><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>Show this help manual and optionally search for <em>PATTERN</em> regular expression.</dd></dl><dl><dt>...</dt><dd>Anything else is passed to <a class="md2man-reference">rake(1)</a>; run <code>rake --help</code> for documentation.</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">rake(1)</a>, <a class="md2man-reference" href="../man1/binman.1.html">binman(1)</a>, <a class="md2man-reference">md2man-rake(1)</a></p></div></body>
|
22
22
|
</html>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
.TH BINMAN\-ROFF 1 2016\-02\-28 5.1.0
|
2
|
+
.SH NAME
|
3
|
+
.PP
|
4
|
+
binman\-roff \- UNIX manpage from header comment
|
5
|
+
.SH SYNOPSIS
|
6
|
+
.PP
|
7
|
+
\fB\fCbinman\-roff\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
|
14
|
+
.BR roff (7)
|
15
|
+
for display by
|
16
|
+
.BR man (1).
|
17
|
+
.SH SEE ALSO
|
18
|
+
.PP
|
19
|
+
.BR binman-text (1),
|
20
|
+
.BR binman-html (1),
|
21
|
+
.BR binman (1),
|
22
|
+
.BR roff (7),
|
23
|
+
.BR man (1)
|
@@ -0,0 +1,12 @@
|
|
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-roff(1) — UNIX manpage from header comment</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-roff.1</span></div></div><div class="container-fluid"><h1 id="binman-roff-1-2016-02-28-5-1-0"><span class="md2man-title">BINMAN-ROFF</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-roff-1-2016-02-28-5-1-0" href="#binman-roff-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-roff - UNIX manpage from header comment</p><h2 id="synopsis">SYNOPSIS<a name="synopsis" href="#synopsis" class="md2man-permalink" title="permalink"></a></h2><p><code>binman-roff</code> [<em>OPTION</em>]... [<em>FILE</em>]</p><h2 id="description">DESCRIPTION<a name="description" href="#description" class="md2man-permalink" title="permalink"></a></h2><p>Extracts the "embedded manpage source", described in <a class="md2man-reference" href="../man1/binman-text.1.html">binman-text(1)</a>, from the
|
11
|
+
given <em>FILE</em> or STDIN and transforms it into <a class="md2man-reference">roff(7)</a> for display by <a class="md2man-reference">man(1)</a>.</p><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-html.1.html">binman-html(1)</a>, <a class="md2man-reference" href="../man1/binman.1.html">binman(1)</a>, <a class="md2man-reference">roff(7)</a>, <a class="md2man-reference">man(1)</a></p></div></body>
|
12
|
+
</html>
|
@@ -0,0 +1,219 @@
|
|
1
|
+
.TH BINMAN\-SHOW 1 2016\-02\-28 5.1.0
|
2
|
+
.SH NAME
|
3
|
+
.PP
|
4
|
+
binman\-show \- show manpage from header comment
|
5
|
+
.SH SYNOPSIS
|
6
|
+
.PP
|
7
|
+
\fB\fCbinman\-show\fR [\fIOPTION\fP]... [\fIFILE\fP] [\fIPATTERN\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, transforms it into
|
14
|
+
.BR roff (7),
|
15
|
+
and displays it in
|
16
|
+
.BR man (1).
|
17
|
+
.PP
|
18
|
+
If the optional \fIPATTERN\fP regular expression is specified, searches for it
|
19
|
+
inside the output displayed by
|
20
|
+
.BR man (1)
|
21
|
+
and jumps to the first match if found.
|
22
|
+
.PP
|
23
|
+
If
|
24
|
+
.BR man (1)
|
25
|
+
cannot display the
|
26
|
+
.BR roff (7)
|
27
|
+
conversion, falls back to the displaying
|
28
|
+
the HTML conversion. And if that fails too, displays the manpage source as\-is.
|
29
|
+
.SS Examples
|
30
|
+
.PP
|
31
|
+
See "Embedded manpage sources" in
|
32
|
+
.BR binman-text (1)
|
33
|
+
for header comment syntax.
|
34
|
+
.SS From a shell script
|
35
|
+
.PP
|
36
|
+
.RS
|
37
|
+
.nf
|
38
|
+
#!/usr/bin/sh
|
39
|
+
# your program's manual page goes here
|
40
|
+
|
41
|
+
binman\-show "$0"
|
42
|
+
.fi
|
43
|
+
.RE
|
44
|
+
.SS From a Ruby script
|
45
|
+
.PP
|
46
|
+
.RS
|
47
|
+
.nf
|
48
|
+
#!/usr/bin/env ruby
|
49
|
+
# your program's manual page goes here
|
50
|
+
|
51
|
+
require 'binman'
|
52
|
+
BinMan.show
|
53
|
+
.fi
|
54
|
+
.RE
|
55
|
+
.PP
|
56
|
+
You can also specify your program's source file encoding above the manual:
|
57
|
+
.PP
|
58
|
+
.RS
|
59
|
+
.nf
|
60
|
+
#!/usr/bin/env ruby
|
61
|
+
# \-*\- coding: utf\-8 \-*\-
|
62
|
+
# your program's manual page goes here
|
63
|
+
.fi
|
64
|
+
.RE
|
65
|
+
.PP
|
66
|
+
You can also write the manual as a multi\-line Ruby comment:
|
67
|
+
.PP
|
68
|
+
.RS
|
69
|
+
.nf
|
70
|
+
#!/usr/bin/env ruby
|
71
|
+
=begin
|
72
|
+
your program's manual page goes here
|
73
|
+
=end
|
74
|
+
.fi
|
75
|
+
.RE
|
76
|
+
.PP
|
77
|
+
You can also specify your program's source file encoding above the manual:
|
78
|
+
.PP
|
79
|
+
.RS
|
80
|
+
.nf
|
81
|
+
#!/usr/bin/env ruby
|
82
|
+
# \-*\- coding: utf\-8 \-*\-
|
83
|
+
=begin
|
84
|
+
your program's manual page goes here
|
85
|
+
=end
|
86
|
+
.fi
|
87
|
+
.RE
|
88
|
+
.SS From a Perl script
|
89
|
+
.PP
|
90
|
+
.RS
|
91
|
+
.nf
|
92
|
+
#!/usr/bin/env perl
|
93
|
+
# your program's manual page goes here
|
94
|
+
|
95
|
+
system('binman\-show', __FILE__);
|
96
|
+
.fi
|
97
|
+
.RE
|
98
|
+
.PP
|
99
|
+
You can also write the manual as a multi\-line Ruby comment after \fB\fC__END__\fR:
|
100
|
+
.PP
|
101
|
+
.RS
|
102
|
+
.nf
|
103
|
+
#!/usr/bin/env perl
|
104
|
+
print "your program's code goes here";
|
105
|
+
__END__
|
106
|
+
=begin
|
107
|
+
your program's manual page goes here
|
108
|
+
=end
|
109
|
+
.fi
|
110
|
+
.RE
|
111
|
+
.SS From a Python script
|
112
|
+
.PP
|
113
|
+
.RS
|
114
|
+
.nf
|
115
|
+
#!/usr/bin/env python
|
116
|
+
# your program's manual page goes here
|
117
|
+
|
118
|
+
import subprocess
|
119
|
+
|
120
|
+
subprocess.call(['binman\-show', __file__])
|
121
|
+
.fi
|
122
|
+
.RE
|
123
|
+
.PP
|
124
|
+
You can also specify your program's source file encoding above the manual:
|
125
|
+
.PP
|
126
|
+
.RS
|
127
|
+
.nf
|
128
|
+
#!/usr/bin/env python
|
129
|
+
# \-*\- coding: utf\-8 \-*\-
|
130
|
+
# your program's manual page goes here
|
131
|
+
.fi
|
132
|
+
.RE
|
133
|
+
.PP
|
134
|
+
You can also write the manual as a multi\-line Ruby comment inside a docstring:
|
135
|
+
.PP
|
136
|
+
.RS
|
137
|
+
.nf
|
138
|
+
#!/usr/bin/env python
|
139
|
+
"""
|
140
|
+
=begin
|
141
|
+
your program's manual page goes here
|
142
|
+
=end
|
143
|
+
"""
|
144
|
+
.fi
|
145
|
+
.RE
|
146
|
+
.PP
|
147
|
+
You can also specify your program's source file encoding above the manual:
|
148
|
+
.PP
|
149
|
+
.RS
|
150
|
+
.nf
|
151
|
+
#!/usr/bin/env python
|
152
|
+
# \-*\- coding: utf\-8 \-*\-
|
153
|
+
"""
|
154
|
+
=begin
|
155
|
+
your program's manual page goes here
|
156
|
+
=end
|
157
|
+
"""
|
158
|
+
.fi
|
159
|
+
.RE
|
160
|
+
.SS From an AWK script
|
161
|
+
.PP
|
162
|
+
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]\&.
|
163
|
+
.PP
|
164
|
+
.RS
|
165
|
+
.nf
|
166
|
+
#!/usr/bin/awk \-f
|
167
|
+
# your program's manual page goes here
|
168
|
+
|
169
|
+
BEGIN {getline c <"/proc/self/cmdline"; sub(".*\-f\\0"," ",c); sub("\\0.*","",c);
|
170
|
+
system("binman\-show" c)}
|
171
|
+
.fi
|
172
|
+
.RE
|
173
|
+
.SS From a Tcl script
|
174
|
+
.PP
|
175
|
+
.RS
|
176
|
+
.nf
|
177
|
+
#!/usr/bin/env tclsh
|
178
|
+
# your program's manual page goes here
|
179
|
+
|
180
|
+
exec >/dev/tty binman\-show $argv0
|
181
|
+
.fi
|
182
|
+
.RE
|
183
|
+
.PP
|
184
|
+
You can also write the manual as a multi\-line Ruby comment inside an \fB\fCif 0\fR:
|
185
|
+
.PP
|
186
|
+
.RS
|
187
|
+
.nf
|
188
|
+
#!/usr/bin/env tclsh
|
189
|
+
if 0 {
|
190
|
+
=begin
|
191
|
+
your program's manual page goes here
|
192
|
+
=end
|
193
|
+
}
|
194
|
+
.fi
|
195
|
+
.RE
|
196
|
+
.SS From a Node.js script
|
197
|
+
.PP
|
198
|
+
.RS
|
199
|
+
.nf
|
200
|
+
/*
|
201
|
+
=begin
|
202
|
+
your program's manual page goes here
|
203
|
+
=end
|
204
|
+
*/
|
205
|
+
|
206
|
+
require('child_process').exec(['>/dev/tty', 'binman\-show', __filename].join(' '));
|
207
|
+
.fi
|
208
|
+
.RE
|
209
|
+
.SH OPTIONS
|
210
|
+
.TP
|
211
|
+
\fB\fC\-h\fR [\fIPATTERN\fP], \fB\fC\-\-help\fR [\fIPATTERN\fP]
|
212
|
+
Show this help manual and optionally search for \fIPATTERN\fP regular expression.
|
213
|
+
.SH SEE ALSO
|
214
|
+
.PP
|
215
|
+
.BR binman-text (1),
|
216
|
+
.BR binman-roff (1),
|
217
|
+
.BR binman-html (1),
|
218
|
+
.BR binman-help (1),
|
219
|
+
.BR binman (1)
|
@@ -0,0 +1,104 @@
|
|
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-show(1) — show manpage from header comment</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-show.1</span></div></div><div class="container-fluid"><h1 id="binman-show-1-2016-02-28-5-1-0"><span class="md2man-title">BINMAN-SHOW</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-show-1-2016-02-28-5-1-0" href="#binman-show-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-show - show manpage from header comment</p><h2 id="synopsis">SYNOPSIS<a name="synopsis" href="#synopsis" class="md2man-permalink" title="permalink"></a></h2><p><code>binman-show</code> [<em>OPTION</em>]... [<em>FILE</em>] [<em>PATTERN</em>]</p><h2 id="description">DESCRIPTION<a name="description" href="#description" class="md2man-permalink" title="permalink"></a></h2><p>Extracts the "embedded manpage source", described in <a class="md2man-reference" href="../man1/binman-text.1.html">binman-text(1)</a>, from the
|
11
|
+
given <em>FILE</em> or STDIN, transforms it into <a class="md2man-reference">roff(7)</a>, and displays it in <a class="md2man-reference">man(1)</a>.</p><p>If the optional <em>PATTERN</em> regular expression is specified, searches for it
|
12
|
+
inside the output displayed by <a class="md2man-reference">man(1)</a> and jumps to the first match if found.</p><p>If <a class="md2man-reference">man(1)</a> cannot display the <a class="md2man-reference">roff(7)</a> conversion, falls back to the displaying
|
13
|
+
the HTML conversion. And if that fails too, displays the manpage source as-is.</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-show <span class="s2">"</span><span class="nv">$0</span><span class="s2">"</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">show</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-show'</span><span class="p">,</span> <span class="nv">__FILE__</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">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-show'</span><span class="p">,</span> <span class="n">__file__</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); sub("\0.*","",c);
|
81
|
+
system("binman-show" c)}
|
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="nb">exec</span> >/dev/tty binman-show <span class="nv">$argv0</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="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><span class="s1">'>/dev/tty'</span><span class="p">,</span> <span class="s1">'binman-show'</span><span class="p">,</span> <span class="nx">__filename</span><span class="p">].</span><span class="nx">join</span><span class="p">(</span><span class="s1">' '</span><span class="p">));</span>
|
102
|
+
</code></pre>
|
103
|
+
<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>Show this help manual and optionally search for <em>PATTERN</em> regular expression.</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-help.1.html">binman-help(1)</a>, <a class="md2man-reference" href="../man1/binman.1.html">binman(1)</a></p></div></body>
|
104
|
+
</html>
|