binman 3.3.0 → 3.3.1
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 +1 -1
- data/VERSION.markdown +6 -0
- data/bin/binman +3 -4
- data/bin/binman-rake +1 -1
- data/lib/binman.rb +10 -2
- data/lib/binman/rakefile.rb +3 -1
- data/lib/binman/version.rb +1 -1
- data/man/man0/README.html +1 -1
- data/man/man0/README.markdown +1 -1
- data/man/man0/VERSION.html +5 -1
- data/man/man0/VERSION.markdown +6 -0
- data/man/man1/binman-rake.1 +1 -1
- data/man/man1/binman-rake.1.html +1 -1
- data/man/man1/binman.1 +4 -6
- data/man/man1/binman.1.html +3 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f3b3687542b1a69561f529fc61d665362d8f24c
|
4
|
+
data.tar.gz: eec321fbae059b219be9abfefc3787ef7a962c6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a33ac785e0c5f5cb781d378eeff7af67b383718109f8e660a6576a6c17a25fabe4c453d30a6cce5119bc3e87d1aacd83e31fd34f67a6c45c0fe18b65e222760
|
7
|
+
data.tar.gz: 47392e910b2c75e9f3d5590c357485e1c917a6d1df5bc3f17766b5230f108871a7aac8b7f1fb1e91ca83e7e73fd9dc8e00f02e3c3d05dd7b1b82f426c575879a
|
data/README.markdown
CHANGED
data/VERSION.markdown
CHANGED
data/bin/binman
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
=begin =======================================================================
|
3
3
|
|
4
|
-
# BINMAN 1 2013-
|
4
|
+
# BINMAN 1 2013-06-01 3.3.1
|
5
5
|
|
6
6
|
## NAME
|
7
7
|
|
@@ -34,7 +34,7 @@ A leading comment header can be one of the following two things:
|
|
34
34
|
### Markdown processing divergence
|
35
35
|
|
36
36
|
Although your leading comment headers are written in markdown(7), `binman
|
37
|
-
conv` inherits the following additions to markdown(7) syntax from
|
37
|
+
conv` inherits the following additions to markdown(7) syntax from md2man(5):
|
38
38
|
|
39
39
|
* There can be at most one top-level heading (H1). It is emitted as `.TH`
|
40
40
|
in the roff(7) output to define the UNIX manual page's header and footer.
|
@@ -55,7 +55,6 @@ The following [Redcarpet] extensions are enabled while processing markdown(7):
|
|
55
55
|
* autolink
|
56
56
|
* superscript
|
57
57
|
* strikethrough
|
58
|
-
* no\_intra\_emphasis
|
59
58
|
* fenced\_code\_blocks
|
60
59
|
|
61
60
|
## OPTIONS
|
@@ -88,7 +87,7 @@ The following [Redcarpet] extensions are enabled while processing markdown(7):
|
|
88
87
|
|
89
88
|
## SEE ALSO
|
90
89
|
|
91
|
-
man(1), roff(7), markdown(7)
|
90
|
+
binman-rake(1), man(1), roff(7), markdown(7)
|
92
91
|
|
93
92
|
[binman]: https://github.com/sunaku/binman
|
94
93
|
[md2man]: https://github.com/sunaku/md2man
|
data/bin/binman-rake
CHANGED
data/lib/binman.rb
CHANGED
@@ -31,10 +31,9 @@ module BinMan
|
|
31
31
|
|
32
32
|
# Converts given markdown(7) source into roff(7).
|
33
33
|
def conv source=nil
|
34
|
+
require_md2man
|
34
35
|
require 'md2man/roff/engine'
|
35
36
|
Md2Man::Roff::ENGINE.render(read(source))
|
36
|
-
rescue LoadError
|
37
|
-
raise 'Run `gem install md2man --version "~> 2.0"` to use BinMan::conv().'
|
38
37
|
end
|
39
38
|
|
40
39
|
# Extracts leading comment header content from given
|
@@ -91,6 +90,15 @@ module BinMan
|
|
91
90
|
end
|
92
91
|
end
|
93
92
|
|
93
|
+
# Requires that the correct version of Md2Man is available on this system.
|
94
|
+
def require_md2man
|
95
|
+
require 'rubygems' unless respond_to? :gem
|
96
|
+
gem 'md2man', '~> 2.0' if respond_to? :gem
|
97
|
+
require 'md2man/version'
|
98
|
+
rescue LoadError
|
99
|
+
raise "Run `gem install md2man --version '~> 2.0'` for #{library.inspect}."
|
100
|
+
end
|
101
|
+
|
94
102
|
private
|
95
103
|
|
96
104
|
# Returns contents of given source I/O, file name, or string.
|
data/lib/binman/rakefile.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'binman'
|
1
2
|
require 'rake'
|
2
3
|
|
3
4
|
# build man pages before building ruby gem using bundler
|
@@ -16,7 +17,6 @@ mkds = bins.pathmap("#{dir}/%n.1.markdown")
|
|
16
17
|
|
17
18
|
bins.zip(mkds).each do |src, dst|
|
18
19
|
file dst => [dir, src] do
|
19
|
-
require 'binman'
|
20
20
|
output = BinMan.load(src)
|
21
21
|
File.open(dst, 'w') {|f| f << output }
|
22
22
|
end
|
@@ -26,6 +26,7 @@ end
|
|
26
26
|
desc 'Build UNIX manual pages for bin/ scripts.'
|
27
27
|
task 'binman:man' => mkds do
|
28
28
|
#-----------------------------------------------------------------------------
|
29
|
+
BinMan.require_md2man
|
29
30
|
load 'md2man/rakefile.rb'
|
30
31
|
Rake::Task['md2man:man'].invoke
|
31
32
|
end
|
@@ -34,6 +35,7 @@ end
|
|
34
35
|
desc 'Build HTML manual pages for bin/ scripts.'
|
35
36
|
task 'binman:web' => mkds do
|
36
37
|
#-----------------------------------------------------------------------------
|
38
|
+
BinMan.require_md2man
|
37
39
|
load 'md2man/rakefile.rb'
|
38
40
|
Rake::Task['md2man:web'].invoke
|
39
41
|
end
|
data/lib/binman/version.rb
CHANGED
data/man/man0/README.html
CHANGED
@@ -14,7 +14,7 @@ comments or uses <code>#</code> for single-line comments: Ruby,
|
|
14
14
|
Perl, Python, Node.js, Tcl, AWK, UNIX shell, and more!</p></li>
|
15
15
|
<li><p>Provides a Ruby library and a command-line client too.</p></li>
|
16
16
|
<li><p>Individual extraction, conversion, and display commands.</p></li>
|
17
|
-
<li><p>Implemented in roughly
|
17
|
+
<li><p>Implemented in roughly 130 lines of pure Ruby code! :-)</p></li>
|
18
18
|
</ul>
|
19
19
|
<h3 id="Demonstration">Demonstration</h3><p><img src="http://ompldr.org/vYm5mcg" alt="Obligatory screen-shot of binman(1) in action!"></p><p>Here is <a href="https://raw.github.com/sunaku/binman/master/bin/binman">a complete example in Ruby</a> to help you get started.
|
20
20
|
For examples in other scripting languages, see the "Usage" section below!</p><h2 id="Installation">Installation</h2><p>If you only want to view pre-built manual pages:</p>
|
data/man/man0/README.markdown
CHANGED
data/man/man0/VERSION.html
CHANGED
@@ -7,7 +7,11 @@
|
|
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-3-3-
|
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-3-3-1-2013-06-01">Version 3.3.1 (2013-06-01)</h2><p>Patch:</p>
|
11
|
+
<ul>
|
12
|
+
<li>Ensure that md2man 2.0 is loaded before running any BinMan rake tasks.</li>
|
13
|
+
</ul>
|
14
|
+
<h2 id="Version-3-3-0-2013-05-08">Version 3.3.0 (2013-05-08)</h2><p>Minor:</p>
|
11
15
|
<ul>
|
12
16
|
<li><p>Add <a class="md2man-xref" href="../man1/binman-rake.1.html">binman-rake(1)</a> script to provide access to <code>binman/rakefile</code> tasks.</p></li>
|
13
17
|
<li><p>Always try showing HTML manual page in web browser from <code>BinMan.show()</code>.</p></li>
|
data/man/man0/VERSION.markdown
CHANGED
data/man/man1/binman-rake.1
CHANGED
data/man/man1/binman-rake.1.html
CHANGED
@@ -7,7 +7,7 @@
|
|
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-2013-
|
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-2013-06-01-3-3-1">BINMAN-RAKE 1 2013-06-01 3.3.1</h1><h2 id="NAME">NAME</h2><p>binman-rake - run <a class="md2man-xref">rake(1)</a> tasks from <a class="md2man-xref" href="../man1/binman.1.html">binman(1)</a></p><h2 id="SYNOPSIS">SYNOPSIS</h2><p><code>binman-rake</code> [<em>OPTION</em>]... [<em>TASK</em>]...</p><h2 id="DESCRIPTION">DESCRIPTION</h2><p>This program lets you run <a class="md2man-xref">rake(1)</a> tasks provided by <a class="md2man-xref" href="../man1/binman.1.html">binman(1)</a> without having
|
11
11
|
to create a special file named <code>Rakefile</code> that contains the following snippet:</p>
|
12
12
|
<pre><code>require 'binman/rakefile'
|
13
13
|
</code></pre>
|
data/man/man1/binman.1
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
.TH BINMAN 1 2013\-
|
1
|
+
.TH BINMAN 1 2013\-06\-01 3.3.1
|
2
2
|
.SH NAME
|
3
3
|
.PP
|
4
4
|
binman \- man pages for bin scripts
|
@@ -42,9 +42,8 @@ Although your leading comment headers are written in
|
|
42
42
|
\fB\fCbinman
|
43
43
|
conv\fR inherits the following additions to
|
44
44
|
.BR markdown (7)
|
45
|
-
syntax from
|
46
|
-
.
|
47
|
-
.UE :
|
45
|
+
syntax from
|
46
|
+
.BR md2man (5):
|
48
47
|
.RS
|
49
48
|
.IP \(bu 2
|
50
49
|
There can be at most one top\-level heading (H1). It is emitted as \fB\fC.TH\fR
|
@@ -81,8 +80,6 @@ superscript
|
|
81
80
|
.IP \(bu 2
|
82
81
|
strikethrough
|
83
82
|
.IP \(bu 2
|
84
|
-
no_intra_emphasis
|
85
|
-
.IP \(bu 2
|
86
83
|
fenced_code_blocks
|
87
84
|
.RE
|
88
85
|
.SH OPTIONS
|
@@ -127,6 +124,7 @@ document read from the given
|
|
127
124
|
\fIFILE\fP or STDIN.
|
128
125
|
.SH SEE ALSO
|
129
126
|
.PP
|
127
|
+
.BR binman-rake (1),
|
130
128
|
.BR man (1),
|
131
129
|
.BR roff (7),
|
132
130
|
.BR markdown (7)
|
data/man/man1/binman.1.html
CHANGED
@@ -7,7 +7,7 @@
|
|
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.1</span></div></div><div class="container-fluid"><h1 id="BINMAN-1-2013-
|
10
|
+
<body><div class="navbar"><div class="navbar-inner"><span class="brand"><a href="../index.html#man1">man1</a>/binman.1</span></div></div><div class="container-fluid"><h1 id="BINMAN-1-2013-06-01-3-3-1">BINMAN 1 2013-06-01 3.3.1</h1><h2 id="NAME">NAME</h2><p>binman - man pages for bin scripts</p><h2 id="SYNOPSIS">SYNOPSIS</h2><p><code>binman</code> [<em>OPTION</em>]... <em>COMMAND</em></p><h2 id="DESCRIPTION">DESCRIPTION</h2><p><a href="https://github.com/sunaku/binman">binman</a> produces UNIX manual pages for your executable scripts. It can
|
11
11
|
extract their leading comment headers (defined below), convert them from
|
12
12
|
<a class="md2man-xref">markdown(7)</a> into <a class="md2man-xref">roff(7)</a> using <a href="https://github.com/sunaku/md2man">md2man</a>, and display them using <a class="md2man-xref">man(1)</a>.</p><h3 id="Leading-comment-headers">Leading comment headers</h3><p>A leading comment header can be one of the following two things:</p>
|
13
13
|
<ol>
|
@@ -21,7 +21,7 @@ begin with the respective delimiters and optionally continue with a single
|
|
21
21
|
space followed by any number of characters until the end of the line.</p></li>
|
22
22
|
</ol>
|
23
23
|
<h3 id="Markdown-processing-divergence">Markdown processing divergence</h3><p>Although your leading comment headers are written in <a class="md2man-xref">markdown(7)</a>, <code>binman
|
24
|
-
conv</code> inherits the following additions to <a class="md2man-xref">markdown(7)</a> syntax from <a
|
24
|
+
conv</code> inherits the following additions to <a class="md2man-xref">markdown(7)</a> syntax from <a class="md2man-xref">md2man(5)</a>:</p>
|
25
25
|
<ul>
|
26
26
|
<li><p>There can be at most one top-level heading (H1). It is emitted as <code>.TH</code>
|
27
27
|
in the <a class="md2man-xref">roff(7)</a> output to define the UNIX manual page's header and footer.</p></li>
|
@@ -38,7 +38,6 @@ are unindented accordingly before emission as <code>.TP</code> in the <a class="
|
|
38
38
|
<li>autolink</li>
|
39
39
|
<li>superscript</li>
|
40
40
|
<li>strikethrough</li>
|
41
|
-
<li>no_intra_emphasis</li>
|
42
41
|
<li>fenced_code_blocks</li>
|
43
42
|
</ul>
|
44
43
|
<h2 id="OPTIONS">OPTIONS</h2><dl><dt><code>-h</code>, <code>--help</code></dt><dd>Show this help manual.</dd></dl><h2 id="COMMANDS">COMMANDS</h2><dl><dt><code>help</code> <em>FILE</em> [<em>ARGUMENT</em>]...</dt><dd>If the given <em>ARGUMENT</em> sequence contains <code>-h</code> or <code>--help</code> except after
|
@@ -47,5 +46,5 @@ converts it into <a class="md2man-xref">roff(7)</a>, and displays it using <a cl
|
|
47
46
|
status code <code>0</code>. Otherwise, this program exits with status code <code>111</code>.</dd></dl><dl><dt><code>show</code> [<em>FILE</em>]</dt><dd>Use <a class="md2man-xref">man(1)</a> to display the <a class="md2man-xref">roff(7)</a> conversion of the leading comment header
|
48
47
|
extracted from the given <em>FILE</em> or STDIN.</dd></dl><dl><dt><code>load</code> [<em>FILE</em>]</dt><dd>Print the leading comment header extracted from the given <em>FILE</em> or STDIN.</dd></dl><dl><dt><code>dump</code> [<em>FILE</em>]</dt><dd>Print the <a class="md2man-xref">roff(7)</a> conversion of the leading comment header extracted from
|
49
48
|
the given <em>FILE</em> or STDIN.</dd></dl><dl><dt><code>conv</code> [<em>FILE</em>]</dt><dd>Print the <a class="md2man-xref">roff(7)</a> conversion of the <a class="md2man-xref">markdown(7)</a> document read from the given
|
50
|
-
<em>FILE</em> or STDIN.</dd></dl><h2 id="SEE-ALSO">SEE ALSO</h2><p><a class="md2man-xref">man(1)</a>, <a class="md2man-xref">roff(7)</a>, <a class="md2man-xref">markdown(7)</a></p></div></body>
|
49
|
+
<em>FILE</em> or STDIN.</dd></dl><h2 id="SEE-ALSO">SEE ALSO</h2><p><a class="md2man-xref" href="../man1/binman-rake.1.html">binman-rake(1)</a>, <a class="md2man-xref">man(1)</a>, <a class="md2man-xref">roff(7)</a>, <a class="md2man-xref">markdown(7)</a></p></div></body>
|
51
50
|
</html>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: binman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
4
|
+
version: 3.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Suraj N. Kurapati
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: md2man
|