binman 4.0.0 → 4.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/VERSION.markdown +43 -0
- data/bin/binman +1 -1
- data/bin/binman-rake +1 -1
- data/lib/binman.rb +61 -38
- data/lib/binman/rakefile.rb +2 -2
- data/lib/binman/version.rb +1 -1
- data/man/index.html +1 -1
- data/man/man0/EXAMPLE.png +1 -0
- data/man/man0/README.html +1 -1
- data/man/man0/README.markdown +1 -0
- data/man/man0/VERSION.html +26 -4
- data/man/man0/VERSION.markdown +1 -0
- data/man/man1/binman-rake.1 +1 -1
- data/man/man1/binman-rake.1.html +2 -2
- data/man/man1/binman.1 +1 -1
- data/man/man1/binman.1.html +2 -2
- data/man/style.css +7 -2
- metadata +3 -3
- data/man/man0/EXAMPLE.png +0 -0
- data/man/man0/README.markdown +0 -376
- data/man/man0/VERSION.markdown +0 -290
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b919eb526cd3af62dc86a638b74af4569487723
|
4
|
+
data.tar.gz: 1ddf9d14c886406da79b2c4b6f5fbe6129ae629f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18978c8074e6b15cb9201f54b8e7c2a2366414dd01d78e6c0f34889dfc84cc1b51eb6526296b0b26d0e459a0d7ce8d5771ade4b9ca7c536b74bc36ad93bae91b
|
7
|
+
data.tar.gz: ecbfcfb0be03016bf1f1ed836ffeb059e0b1d6dd232c424c0e6365f07da548446b36f1eb91de53d01579a1e8bef6c10ceb5d756cd918bd79678b91ca4f8f5835
|
data/VERSION.markdown
CHANGED
@@ -1,3 +1,46 @@
|
|
1
|
+
## Version 4.1.0 (2016-02-10)
|
2
|
+
|
3
|
+
### Minor:
|
4
|
+
|
5
|
+
* Print path of HTML man page to STDOUT when launching browser.
|
6
|
+
|
7
|
+
### Patch:
|
8
|
+
|
9
|
+
* Revert "ensure 'binman:web' task works the first time thru".
|
10
|
+
|
11
|
+
This reverts commit dd0511e78e02546cac4903b5c6de6243607a8bba,
|
12
|
+
which was causing the following error under Ruby 2.3.0p0.
|
13
|
+
|
14
|
+
% rake build
|
15
|
+
mkdir -p man/man1
|
16
|
+
rake aborted!
|
17
|
+
LoadError: cannot load such file -- md2man/rakefile.rb
|
18
|
+
./lib/binman/rakefile.rb:29:in `load'
|
19
|
+
./lib/binman/rakefile.rb:29:in `block in <top (required)>'
|
20
|
+
Tasks: TOP => build => binman => binman:man
|
21
|
+
(See full trace by running task with --trace)
|
22
|
+
exit 1
|
23
|
+
|
24
|
+
* Show HTML manual only as fallback to TTY man page.
|
25
|
+
|
26
|
+
This prevents annoying browser launches every time you run `--help`.
|
27
|
+
|
28
|
+
* `BinMan::show()` didn't always fallback to plain text header.
|
29
|
+
|
30
|
+
* Don't override `man -P` pager; set `$LESS` and `$MORE` instead.
|
31
|
+
|
32
|
+
Also, shell escaping the pattern prevents you from using regexp syntax.
|
33
|
+
|
34
|
+
* `man FILE` isn't portable; use `man -M ...` instead.
|
35
|
+
|
36
|
+
`man FILE` used to work in Debian, but doesn't work under Void Linux.
|
37
|
+
|
38
|
+
`man -l FILE` works in Linux and OpenBSD but not on MacOSX / FreeBSD.
|
39
|
+
|
40
|
+
Therefore, avoid all this portability mess using `man -M ...` instead.
|
41
|
+
|
42
|
+
* Handle case where roff manual page is missing but HTML version exists.
|
43
|
+
|
1
44
|
## Version 4.0.0 (2014-10-26)
|
2
45
|
|
3
46
|
### Major:
|
data/bin/binman
CHANGED
data/bin/binman-rake
CHANGED
data/lib/binman.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'fileutils'
|
1
2
|
require 'shellwords'
|
2
3
|
require 'binman/version'
|
3
4
|
|
@@ -45,38 +46,13 @@ module BinMan
|
|
45
46
|
if file = find(source) and File.exist? file
|
46
47
|
man_page = File.basename(file)
|
47
48
|
man_path = File.expand_path('../../man', file)
|
48
|
-
|
49
|
-
# try showing HTML manual page in a web browser in background
|
50
|
-
require 'opener'
|
51
|
-
Dir["#{man_path}/**/#{man_page}.*.html"].each do |man_html|
|
52
|
-
# close streams to avoid interference with man(1) reader below
|
53
|
-
begin
|
54
|
-
Opener.spawn man_html, 0 => :close, 1 => :close, 2 => :close
|
55
|
-
rescue Errno::ENOENT
|
56
|
-
# designated opener program could not be found on this system
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
# try showing roff manual page in man(1) reader in foreground;
|
61
|
-
# close STDERR to avoid interference with the fall back below
|
62
|
-
return if view query, '-M', man_path, '-a', man_page, 2 => :close
|
49
|
+
return if show_man(man_path, man_page, query)
|
63
50
|
end
|
64
51
|
|
65
|
-
# fall back to
|
52
|
+
# fall back to rendering leading comment header or showing it as-is
|
66
53
|
header = snip(source)
|
67
|
-
|
68
|
-
|
69
|
-
roff = conv(header)
|
70
|
-
require 'tempfile'
|
71
|
-
Tempfile.open 'binman' do |temp|
|
72
|
-
temp.write roff
|
73
|
-
temp.close
|
74
|
-
view query, temp.path, 2 => :close
|
75
|
-
end
|
76
|
-
rescue => error
|
77
|
-
warn "binman: #{error}"
|
78
|
-
puts header
|
79
|
-
end
|
54
|
+
return if show_str(header, query)
|
55
|
+
puts header
|
80
56
|
end
|
81
57
|
|
82
58
|
# Shows leading comment header from given source as UNIX man page and exits
|
@@ -95,16 +71,12 @@ module BinMan
|
|
95
71
|
private
|
96
72
|
|
97
73
|
# Launches man(1) with the given arguments and then tries to search for the
|
98
|
-
# query (if given) within.
|
99
|
-
#
|
74
|
+
# query (if given) within. This is achieved by specifying the LESS and MORE
|
75
|
+
# environment variables used by the less(1) and more(1) pagers respectively.
|
100
76
|
def view query, *argv
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
query and %w[ pager less most more ].any? do |pager|
|
105
|
-
# the `-s` and `+/pattern` options are universally supported by pagers
|
106
|
-
system 'man', '-P', "#{pager} -s +/#{query.shellescape}", *argv
|
107
|
-
end or system 'man', *argv
|
77
|
+
env = query ? {'LESS' => [ENV['LESS'], "+/#{query}"].compact.join(' '),
|
78
|
+
'MORE' => [ENV['MORE'], "+/#{query}"].compact.join(' ')} : {}
|
79
|
+
system env, 'man', *argv
|
108
80
|
end
|
109
81
|
|
110
82
|
# Converts given markdown(7) source into roff(7).
|
@@ -132,4 +104,55 @@ private
|
|
132
104
|
first_caller.sub(/:\d+.*$/, '')
|
133
105
|
end
|
134
106
|
end
|
107
|
+
|
108
|
+
# Tries to show the given manual page file in man(1) reader
|
109
|
+
# and returns true if successful; else you need a fallback.
|
110
|
+
# If HTML manual page shown, its path is printed to stdout.
|
111
|
+
def show_man path, page, query=nil
|
112
|
+
# try showing roff manual page in man(1) reader in foreground
|
113
|
+
Dir["#{path}/man?/#{page}.?"].any? and
|
114
|
+
view query, '-M', path, '-a', page, 2 => :close or
|
115
|
+
begin
|
116
|
+
# try showing HTML manual page in a web browser in background
|
117
|
+
require 'opener'
|
118
|
+
Dir["#{path}/**/#{page}.*.html"].map do |html|
|
119
|
+
begin
|
120
|
+
# close streams to avoid interference with man(1) reader
|
121
|
+
Opener.spawn html, 0 => :close, 1 => :close, 2 => :close
|
122
|
+
puts html
|
123
|
+
true
|
124
|
+
rescue Errno::ENOENT
|
125
|
+
# designated opener program was not found on this system
|
126
|
+
end
|
127
|
+
end.compact.any?
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
# Tries to display the given header string in man(1) reader
|
132
|
+
# and returns true if successful; else you need a fallback.
|
133
|
+
def show_str header, query=nil
|
134
|
+
roff = conv(header)
|
135
|
+
|
136
|
+
require 'tempfile'
|
137
|
+
Tempfile.open 'binman' do |temp|
|
138
|
+
temp_man_root = temp.path + '_man'
|
139
|
+
begin
|
140
|
+
# create a temporary man/ directory structure for `man -M ...`
|
141
|
+
temp_man_page = 'temporary_manual_page'
|
142
|
+
temp_man_path = "#{temp_man_root}/man"
|
143
|
+
temp_man_file = "#{temp_man_path}/man1/#{temp_man_page}.1"
|
144
|
+
FileUtils.mkdir_p File.dirname(temp_man_file)
|
145
|
+
|
146
|
+
# write the given header string to temporary file and show it
|
147
|
+
File.open(temp_man_file, 'w') {|file| file << roff }
|
148
|
+
return true if show_man(temp_man_path, temp_man_page, query)
|
149
|
+
ensure
|
150
|
+
FileUtils.rm_rf temp_man_root
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
false
|
155
|
+
rescue => error
|
156
|
+
warn "binman: #{error}"
|
157
|
+
end
|
135
158
|
end
|
data/lib/binman/rakefile.rb
CHANGED
@@ -26,7 +26,7 @@ end
|
|
26
26
|
desc 'Build UNIX manual pages for bin/ scripts.'
|
27
27
|
task 'binman:man' => mkds do
|
28
28
|
#-----------------------------------------------------------------------------
|
29
|
-
|
29
|
+
require 'md2man/rakefile'
|
30
30
|
Rake::Task['md2man:man'].invoke
|
31
31
|
end
|
32
32
|
|
@@ -34,6 +34,6 @@ end
|
|
34
34
|
desc 'Build HTML manual pages for bin/ scripts.'
|
35
35
|
task 'binman:web' => mkds do
|
36
36
|
#-----------------------------------------------------------------------------
|
37
|
-
|
37
|
+
require 'md2man/rakefile'
|
38
38
|
Rake::Task['md2man:web'].invoke
|
39
39
|
end
|
data/lib/binman/version.rb
CHANGED
data/man/index.html
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<meta charset="utf-8" />
|
5
|
-
<meta name="generator" content="md2man 4.0.
|
5
|
+
<meta name="generator" content="md2man 4.0.1 https://github.com/sunaku/md2man" />
|
6
6
|
<title>man/index</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]-->
|
@@ -0,0 +1 @@
|
|
1
|
+
../../EXAMPLE.png
|
data/man/man0/README.html
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<meta charset="utf-8" />
|
5
|
-
<meta name="generator" content="md2man 4.0.
|
5
|
+
<meta name="generator" content="md2man 4.0.1 https://github.com/sunaku/md2man" />
|
6
6
|
<title>README</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]-->
|
@@ -0,0 +1 @@
|
|
1
|
+
../../README.markdown
|
data/man/man0/VERSION.html
CHANGED
@@ -2,12 +2,34 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<meta charset="utf-8" />
|
5
|
-
<meta name="generator" content="md2man 4.0.
|
5
|
+
<meta name="generator" content="md2man 4.0.1 https://github.com/sunaku/md2man" />
|
6
6
|
<title>VERSION</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-4-
|
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-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>Version 4.1.0 (2016-02-10)</h2><h3 id="minor"><a name="minor" href="#minor" class="md2man-permalink" title="permalink"></a>Minor:</h3>
|
11
|
+
<ul>
|
12
|
+
<li>Print path of HTML man page to STDOUT when launching browser.</li>
|
13
|
+
</ul>
|
14
|
+
<h3 id="patch"><a name="patch" href="#patch" class="md2man-permalink" title="permalink"></a>Patch:</h3>
|
15
|
+
<ul>
|
16
|
+
<li><p>Revert "ensure 'binman:web' task works the first time thru".</p><p>This reverts commit dd0511e78e02546cac4903b5c6de6243607a8bba,
|
17
|
+
which was causing the following error under Ruby 2.3.0p0.</p><dl><dd>% rake build
|
18
|
+
mkdir -p man/man1
|
19
|
+
rake aborted!
|
20
|
+
LoadError: cannot load such file -- md2man/rakefile.rb
|
21
|
+
./lib/binman/rakefile.rb:29:in <code>load'
|
22
|
+
./lib/binman/rakefile.rb:29:in</code>block in <top (required)>'
|
23
|
+
Tasks: TOP => build => binman => binman:man
|
24
|
+
(See full trace by running task with --trace)
|
25
|
+
exit 1</dd></dl></li>
|
26
|
+
<li><p>Show HTML manual only as fallback to TTY man page.</p><p>This prevents annoying browser launches every time you run <code>--help</code>.</p></li>
|
27
|
+
<li><p><code>BinMan::show()</code> didn't always fallback to plain text header.</p></li>
|
28
|
+
<li><p>Don't override <code>man -P</code> pager; set <code>$LESS</code> and <code>$MORE</code> instead.</p><p>Also, shell escaping the pattern prevents you from using regexp syntax.</p></li>
|
29
|
+
<li><p><code>man FILE</code> isn't portable; use <code>man -M ...</code> instead.</p><p><code>man FILE</code> used to work in Debian, but doesn't work under Void Linux.</p><p><code>man -l FILE</code> works in Linux and OpenBSD but not on MacOSX / FreeBSD.</p><p>Therefore, avoid all this portability mess using <code>man -M ...</code> instead.</p></li>
|
30
|
+
<li><p>Handle case where roff manual page is missing but HTML version exists.</p></li>
|
31
|
+
</ul>
|
32
|
+
<h2 id="version-4-0-0-2014-10-26"><a name="version-4-0-0-2014-10-26" href="#version-4-0-0-2014-10-26" class="md2man-permalink" title="permalink"></a>Version 4.0.0 (2014-10-26)</h2><h3 id="major"><a name="major" href="#major" class="md2man-permalink" title="permalink"></a>Major:</h3>
|
11
33
|
<ul>
|
12
34
|
<li><p><a class="md2man-reference" href="../man1/binman.1.html">binman(1)</a>: Rename the <code>load</code> command to <code>snip</code> and remove <code>conv</code>.</p>
|
13
35
|
<ul>
|
@@ -17,7 +39,7 @@
|
|
17
39
|
<li><p>Upgrade to md2man 4.0, which no longer expands cross references in code
|
18
40
|
spans and code blocks. Your manuals might be rendered differently now.</p></li>
|
19
41
|
</ul>
|
20
|
-
<h2 id="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>Version 3.4.1 (2014-07-01)</h2><p>This release fixes the help options' REGEXP argument under non-Debian systems.</p><h3 id="patch"><a name="patch" href="#patch" class="md2man-permalink" title="permalink"></a>Patch:</h3>
|
42
|
+
<h2 id="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>Version 3.4.1 (2014-07-01)</h2><p>This release fixes the help options' REGEXP argument under non-Debian systems.</p><h3 id="patch-1"><a name="patch-1" href="#patch-1" class="md2man-permalink" title="permalink"></a>Patch:</h3>
|
21
43
|
<ul>
|
22
44
|
<li><p><a class="md2man-reference">pager(1)</a> isn't a universal command: CentOS uses <code>less -is</code> instead.</p></li>
|
23
45
|
<li><p>Silence <a class="md2man-reference">man(1)</a> stderr when displaying dynamically extracted manual.</p></li>
|
@@ -28,7 +50,7 @@ spans and code blocks. Your manuals might be rendered differently now.</p></li>
|
|
28
50
|
<li><p>Document REGEXP argument for help options in <code>bin/*</code>.</p></li>
|
29
51
|
<li><p>Refer to REGEXP argument as PATTERN like less does.</p></li>
|
30
52
|
</ul>
|
31
|
-
<h2 id="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>Version 3.4.0 (2014-06-29)</h2><h3 id="minor"><a name="minor" href="#minor" class="md2man-permalink" title="permalink"></a>Minor:</h3>
|
53
|
+
<h2 id="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>Version 3.4.0 (2014-06-29)</h2><h3 id="minor-1"><a name="minor-1" href="#minor-1" class="md2man-permalink" title="permalink"></a>Minor:</h3>
|
32
54
|
<ul>
|
33
55
|
<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
|
34
56
|
followed by a regular expression argument that specifies text to search
|
@@ -0,0 +1 @@
|
|
1
|
+
../../VERSION.markdown
|
data/man/man1/binman-rake.1
CHANGED
data/man/man1/binman-rake.1.html
CHANGED
@@ -2,12 +2,12 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<meta charset="utf-8" />
|
5
|
-
<meta name="generator" content="md2man 4.0.
|
5
|
+
<meta name="generator" content="md2man 4.0.1 https://github.com/sunaku/md2man" />
|
6
6
|
<title>binman-rake(1) — run rake(1) tasks from binman(1)</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-
|
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-10-4-1-0"><a name="binman-rake-1-2016-02-10-4-1-0" href="#binman-rake-1-2016-02-10-4-1-0" class="md2man-permalink" title="permalink"></a><span class="md2man-title">BINMAN-RAKE</span> <span class="md2man-section">1</span> <span class="md2man-date">2016-02-10</span> <span class="md2man-source">4.1.0</span></h1><h2 id="name"><a name="name" href="#name" class="md2man-permalink" title="permalink"></a>NAME</h2><p>binman-rake - run <a class="md2man-reference">rake(1)</a> tasks from <a class="md2man-reference" href="../man1/binman.1.html">binman(1)</a></p><h2 id="synopsis"><a name="synopsis" href="#synopsis" class="md2man-permalink" title="permalink"></a>SYNOPSIS</h2><p><code>binman-rake</code> [<em>OPTION</em>]... [<em>TASK</em>]...</p><h2 id="description"><a name="description" href="#description" class="md2man-permalink" title="permalink"></a>DESCRIPTION</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
11
|
to create a special file named <code>Rakefile</code> that contains the following snippet:</p><pre><code>require 'binman/rakefile'
|
12
12
|
</code></pre>
|
13
13
|
<p>If no <em>TASK</em> is specified, then the <code>binman</code> task is run by default.</p><h2 id="tasks"><a name="tasks" href="#tasks" class="md2man-permalink" title="permalink"></a>TASKS</h2><dl><dt><code>binman</code></dt><dd>Runs the <code>binman:man</code> and <code>binman:web</code> tasks, in that order.</dd></dl><dl><dt><code>binman:man</code></dt><dd>Builds UNIX manual pages from scripts found in your <code>bin/</code> directory.
|
data/man/man1/binman.1
CHANGED
data/man/man1/binman.1.html
CHANGED
@@ -2,12 +2,12 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<meta charset="utf-8" />
|
5
|
-
<meta name="generator" content="md2man 4.0.
|
5
|
+
<meta name="generator" content="md2man 4.0.1 https://github.com/sunaku/md2man" />
|
6
6
|
<title>binman(1) — man pages for bin scripts</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.1</span></div></div><div class="container-fluid"><h1 id="binman-1-
|
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-2016-02-10-4-1-0"><a name="binman-1-2016-02-10-4-1-0" href="#binman-1-2016-02-10-4-1-0" class="md2man-permalink" title="permalink"></a><span class="md2man-title">BINMAN</span> <span class="md2man-section">1</span> <span class="md2man-date">2016-02-10</span> <span class="md2man-source">4.1.0</span></h1><h2 id="name"><a name="name" href="#name" class="md2man-permalink" title="permalink"></a>NAME</h2><p>binman - man pages for bin scripts</p><h2 id="synopsis"><a name="synopsis" href="#synopsis" class="md2man-permalink" title="permalink"></a>SYNOPSIS</h2><p><code>binman</code> [<em>OPTION</em>]... <em>COMMAND</em></p><h2 id="description"><a name="description" href="#description" class="md2man-permalink" title="permalink"></a>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-reference">markdown(7)</a> into <a class="md2man-reference">roff(7)</a> using <a href="https://github.com/sunaku/md2man">md2man</a>, and display them using <a class="md2man-reference">man(1)</a>.</p><h3 id="leading-comment-headers"><a name="leading-comment-headers" href="#leading-comment-headers" class="md2man-permalink" title="permalink"></a>Leading comment headers</h3><p>A leading comment header can be one of the following two things:</p>
|
13
13
|
<ol>
|
data/man/style.css
CHANGED
@@ -40,15 +40,20 @@
|
|
40
40
|
float: left;
|
41
41
|
margin-left: -1em;
|
42
42
|
opacity: 0.25;
|
43
|
+
font-size: xx-large;
|
43
44
|
}
|
44
45
|
|
45
46
|
a.md2man-permalink:before {
|
46
|
-
content: '\
|
47
|
+
content: '\2605'; /* ★ */
|
47
48
|
}
|
48
49
|
|
49
50
|
a.md2man-permalink:hover,
|
50
51
|
*:target > a.md2man-permalink {
|
51
|
-
opacity:
|
52
|
+
opacity: inherit;
|
53
|
+
}
|
54
|
+
|
55
|
+
*:target > a.md2man-permalink {
|
56
|
+
color: red;
|
52
57
|
}
|
53
58
|
}
|
54
59
|
|
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: 4.
|
4
|
+
version: 4.1.0
|
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:
|
11
|
+
date: 2016-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: md2man
|
@@ -110,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
110
110
|
version: '0'
|
111
111
|
requirements: []
|
112
112
|
rubyforge_project:
|
113
|
-
rubygems_version: 2.
|
113
|
+
rubygems_version: 2.5.1
|
114
114
|
signing_key:
|
115
115
|
specification_version: 4
|
116
116
|
summary: man pages for bin scripts
|
data/man/man0/EXAMPLE.png
DELETED
Binary file
|
data/man/man0/README.markdown
DELETED
@@ -1,376 +0,0 @@
|
|
1
|
-
# binman - man pages for bin scripts
|
2
|
-
|
3
|
-
[binman] produces UNIX manual pages for executable scripts using [md2man].
|
4
|
-
Simply [document your script in Markdown][md2man-markdown] as a comment at the
|
5
|
-
top of your script and call `binman show` to display it as a UNIX manual page!
|
6
|
-
Or, call `binman help` to display your manual _only_ when your script receives
|
7
|
-
with `-h` or `--help` command-line options. Or, call `binman snip` to extract
|
8
|
-
the manual from your script for your own custom processing, outside of binman.
|
9
|
-
And that's not all: [see the manual page][binman-man] for more possibilities!
|
10
|
-
|
11
|
-
* Manuals: <https://sunaku.github.io/binman/man>
|
12
|
-
* Sources: <https://github.com/sunaku/binman>
|
13
|
-
* Support: <https://github.com/sunaku/binman/issues>
|
14
|
-
* Package: <https://rubygems.org/gems/binman>
|
15
|
-
|
16
|
-
## Features
|
17
|
-
|
18
|
-
* Supports any scripting language that has multi-line
|
19
|
-
comments or uses `#` for single-line comments: Ruby,
|
20
|
-
Perl, Python, Node.js, Tcl, AWK, UNIX shell, and more!
|
21
|
-
|
22
|
-
* Provides a Ruby library and a command-line client too.
|
23
|
-
|
24
|
-
* Individual extraction, conversion, and display commands.
|
25
|
-
|
26
|
-
* Implemented in roughly 150 lines of pure Ruby code! :-)
|
27
|
-
|
28
|
-
### Demonstration
|
29
|
-
|
30
|
-

|
31
|
-
|
32
|
-
#### What can binman(1) do?
|
33
|
-
|
34
|
-
Here are some real examples of processed bin scripts to help you get started:
|
35
|
-
|
36
|
-
* [bin/tork](https://raw.github.com/sunaku/tork/master/bin/tork) ⇒
|
37
|
-
[tork.1.markdown](https://sunaku.github.io/tork/man/man1/tork.1.markdown) ⇒
|
38
|
-
[tork.1](https://sunaku.github.io/tork/man/man1/tork.1) +
|
39
|
-
[tork.1.html](https://sunaku.github.io/tork/man/man1/tork.1.html)
|
40
|
-
* [bin/tork-runner](https://raw.github.com/sunaku/tork/master/bin/tork-runner) ⇒
|
41
|
-
[tork-runner.1.markdown](https://sunaku.github.io/tork/man/man1/tork-runner.1.markdown) ⇒
|
42
|
-
[tork-runner.1](https://sunaku.github.io/tork/man/man1/tork-runner.1) +
|
43
|
-
[tork-runner.1.html](https://sunaku.github.io/tork/man/man1/tork-runner.1.html)
|
44
|
-
* [bin/tork-herald](https://raw.github.com/sunaku/tork/master/bin/tork-herald) ⇒
|
45
|
-
[tork-herald.1.markdown](https://sunaku.github.io/tork/man/man1/tork-herald.1.markdown) ⇒
|
46
|
-
[tork-herald.1](https://sunaku.github.io/tork/man/man1/tork-herald.1) +
|
47
|
-
[tork-herald.1.html](https://sunaku.github.io/tork/man/man1/tork-herald.1.html)
|
48
|
-
* [bin/tork-driver](https://raw.github.com/sunaku/tork/master/bin/tork-driver) ⇒
|
49
|
-
[tork-driver.1.markdown](https://sunaku.github.io/tork/man/man1/tork-driver.1.markdown) ⇒
|
50
|
-
[tork-driver.1](https://sunaku.github.io/tork/man/man1/tork-driver.1) +
|
51
|
-
[tork-driver.1.html](https://sunaku.github.io/tork/man/man1/tork-driver.1.html)
|
52
|
-
* [bin/tork-engine](https://raw.github.com/sunaku/tork/master/bin/tork-engine) ⇒
|
53
|
-
[tork-engine.1.markdown](https://sunaku.github.io/tork/man/man1/tork-engine.1.markdown) ⇒
|
54
|
-
[tork-engine.1](https://sunaku.github.io/tork/man/man1/tork-engine.1) +
|
55
|
-
[tork-engine.1.html](https://sunaku.github.io/tork/man/man1/tork-engine.1.html)
|
56
|
-
* [bin/tork-master](https://raw.github.com/sunaku/tork/master/bin/tork-master) ⇒
|
57
|
-
[tork-master.1.markdown](https://sunaku.github.io/tork/man/man1/tork-master.1.markdown) ⇒
|
58
|
-
[tork-master.1](https://sunaku.github.io/tork/man/man1/tork-master.1) +
|
59
|
-
[tork-master.1.html](https://sunaku.github.io/tork/man/man1/tork-master.1.html)
|
60
|
-
* [bin/tork-remote](https://raw.github.com/sunaku/tork/master/bin/tork-remote) ⇒
|
61
|
-
[tork-remote.1.markdown](https://sunaku.github.io/tork/man/man1/tork-remote.1.markdown) ⇒
|
62
|
-
[tork-remote.1](https://sunaku.github.io/tork/man/man1/tork-remote.1) +
|
63
|
-
[tork-remote.1.html](https://sunaku.github.io/tork/man/man1/tork-remote.1.html)
|
64
|
-
* [bin/tork-notify](https://raw.github.com/sunaku/tork/master/bin/tork-notify) ⇒
|
65
|
-
[tork-notify.1.markdown](https://sunaku.github.io/tork/man/man1/tork-notify.1.markdown) ⇒
|
66
|
-
[tork-notify.1](https://sunaku.github.io/tork/man/man1/tork-notify.1) +
|
67
|
-
[tork-notify.1.html](https://sunaku.github.io/tork/man/man1/tork-notify.1.html)
|
68
|
-
* [bin/md2man-roff](https://raw.github.com/sunaku/md2man/master/bin/md2man-roff) ⇒
|
69
|
-
[md2man-roff.1.markdown](https://sunaku.github.io/md2man/man/man1/md2man-roff.1.markdown) ⇒
|
70
|
-
[md2man-roff.1](https://sunaku.github.io/md2man/man/man1/md2man-roff.1) +
|
71
|
-
[md2man-roff.1.html](https://sunaku.github.io/md2man/man/man1/md2man-roff.1.html)
|
72
|
-
* [bin/md2man-html](https://raw.github.com/sunaku/md2man/master/bin/md2man-html) ⇒
|
73
|
-
[md2man-html.1.markdown](https://sunaku.github.io/md2man/man/man1/md2man-html.1.markdown) ⇒
|
74
|
-
[md2man-html.1](https://sunaku.github.io/md2man/man/man1/md2man-html.1) +
|
75
|
-
[md2man-html.1.html](https://sunaku.github.io/md2man/man/man1/md2man-html.1.html)
|
76
|
-
* [bin/md2man-rake](https://raw.github.com/sunaku/md2man/master/bin/md2man-rake) ⇒
|
77
|
-
[md2man-rake.1.markdown](https://sunaku.github.io/md2man/man/man1/md2man-rake.1.markdown) ⇒
|
78
|
-
[md2man-rake.1](https://sunaku.github.io/md2man/man/man1/md2man-rake.1) +
|
79
|
-
[md2man-rake.1.html](https://sunaku.github.io/md2man/man/man1/md2man-rake.1.html)
|
80
|
-
* [bin/binman](https://raw.github.com/sunaku/binman/master/bin/binman) ⇒
|
81
|
-
[binman.1.markdown](https://sunaku.github.io/binman/man/man1/binman.1.markdown) ⇒
|
82
|
-
[binman.1](https://sunaku.github.io/binman/man/man1/binman.1) +
|
83
|
-
[binman.1.html](https://sunaku.github.io/binman/man/man1/binman.1.html)
|
84
|
-
* [bin/binman-rake](https://raw.github.com/sunaku/binman/master/bin/binman-rake) ⇒
|
85
|
-
[binman-rake.1.markdown](https://sunaku.github.io/binman/man/man1/binman-rake.1.markdown) ⇒
|
86
|
-
[binman-rake.1](https://sunaku.github.io/binman/man/man1/binman-rake.1) +
|
87
|
-
[binman-rake.1.html](https://sunaku.github.io/binman/man/man1/binman-rake.1.html)
|
88
|
-
|
89
|
-
For examples in even more scripting languages, see the "Usage" section below!
|
90
|
-
|
91
|
-
#### What can binman-rake(1) do?
|
92
|
-
|
93
|
-
Here are some examples of HTML manual _sets_ produced by binman-rake(1):
|
94
|
-
|
95
|
-
* https://sunaku.github.io/tork/man
|
96
|
-
* https://sunaku.github.io/binman/man
|
97
|
-
* https://sunaku.github.io/md2man/man
|
98
|
-
|
99
|
-
## Installation
|
100
|
-
|
101
|
-
If you only want to view pre-built manual pages:
|
102
|
-
|
103
|
-
```sh
|
104
|
-
gem install binman
|
105
|
-
```
|
106
|
-
|
107
|
-
If you also want to build your own manual pages:
|
108
|
-
|
109
|
-
```sh
|
110
|
-
gem install md2man -v '~> 4.0'
|
111
|
-
```
|
112
|
-
|
113
|
-
### Prerequisites
|
114
|
-
|
115
|
-
* Ruby 1.8.7 or 1.9.2 or newer.
|
116
|
-
|
117
|
-
### Development
|
118
|
-
|
119
|
-
```sh
|
120
|
-
git clone git://github.com/sunaku/binman
|
121
|
-
cd binman
|
122
|
-
bundle install
|
123
|
-
bundle exec binman --help # run it directly
|
124
|
-
bundle exec rake --tasks # packaging tasks
|
125
|
-
```
|
126
|
-
|
127
|
-
## Usage
|
128
|
-
|
129
|
-
### At the command line
|
130
|
-
|
131
|
-
See binman(1) manual:
|
132
|
-
|
133
|
-
```sh
|
134
|
-
binman --help
|
135
|
-
```
|
136
|
-
|
137
|
-
### Inside a Ruby script
|
138
|
-
|
139
|
-
```ruby
|
140
|
-
#!/usr/bin/env ruby
|
141
|
-
# your program's manual page goes here
|
142
|
-
|
143
|
-
require 'binman'
|
144
|
-
|
145
|
-
# OPTION 1: show manual and exit if ARGV has -h or --help except after --
|
146
|
-
BinMan.help
|
147
|
-
|
148
|
-
# OPTION 2: show manual unconditionally
|
149
|
-
BinMan.show
|
150
|
-
```
|
151
|
-
|
152
|
-
You can also specify your program's source file encoding above the manual:
|
153
|
-
|
154
|
-
```ruby
|
155
|
-
#!/usr/bin/env ruby
|
156
|
-
# -*- coding: utf-8 -*-
|
157
|
-
# your program's manual page goes here
|
158
|
-
```
|
159
|
-
|
160
|
-
You can also write the manual as a multi-line Ruby comment:
|
161
|
-
|
162
|
-
```ruby
|
163
|
-
#!/usr/bin/env ruby
|
164
|
-
=begin
|
165
|
-
your program's manual page goes here
|
166
|
-
=end
|
167
|
-
```
|
168
|
-
|
169
|
-
You can also specify your program's source file encoding above the manual:
|
170
|
-
|
171
|
-
```ruby
|
172
|
-
#!/usr/bin/env ruby
|
173
|
-
# -*- coding: utf-8 -*-
|
174
|
-
=begin
|
175
|
-
your program's manual page goes here
|
176
|
-
=end
|
177
|
-
```
|
178
|
-
|
179
|
-
See the [API documentation][binman-api] for even more possibilities!
|
180
|
-
|
181
|
-
### Inside a shell script
|
182
|
-
|
183
|
-
```ruby
|
184
|
-
#!/usr/bin/sh
|
185
|
-
# your program's manual page goes here
|
186
|
-
|
187
|
-
# OPTION 1: show manual and exit if ARGV has -h or --help except after --
|
188
|
-
binman help "$0" "$@" && exit
|
189
|
-
|
190
|
-
# OPTION 2: show manual unconditionally
|
191
|
-
binman show "$0"
|
192
|
-
```
|
193
|
-
|
194
|
-
### Inside a Perl script
|
195
|
-
|
196
|
-
```perl
|
197
|
-
#!/usr/bin/env perl
|
198
|
-
# your program's manual page goes here
|
199
|
-
|
200
|
-
# OPTION 1: show manual and exit if ARGV has -h or --help except after --
|
201
|
-
system('binman', 'help', __FILE__, @ARGV) == 0 and exit;
|
202
|
-
|
203
|
-
# OPTION 2: show manual unconditionally
|
204
|
-
system('binman', 'show', __FILE__);
|
205
|
-
```
|
206
|
-
|
207
|
-
You can also write the manual as a multi-line Ruby comment after `__END__`:
|
208
|
-
|
209
|
-
```perl
|
210
|
-
#!/usr/bin/env perl
|
211
|
-
print "your program's code goes here";
|
212
|
-
__END__
|
213
|
-
=begin
|
214
|
-
your program's manual page goes here
|
215
|
-
=end
|
216
|
-
```
|
217
|
-
|
218
|
-
### Inside a Python script
|
219
|
-
|
220
|
-
```python
|
221
|
-
#!/usr/bin/env python
|
222
|
-
# your program's manual page goes here
|
223
|
-
|
224
|
-
import sys, subprocess
|
225
|
-
|
226
|
-
# OPTION 1: show manual and exit if ARGV has -h or --help except after --
|
227
|
-
subprocess.call(['binman', 'help', __file__] + sys.argv) == 0 and sys.exit()
|
228
|
-
|
229
|
-
# OPTION 2: show manual unconditionally
|
230
|
-
subprocess.call(['binman', 'show', __file__])
|
231
|
-
```
|
232
|
-
|
233
|
-
You can also specify your program's source file encoding above the manual:
|
234
|
-
|
235
|
-
```python
|
236
|
-
#!/usr/bin/env python
|
237
|
-
# -*- coding: utf-8 -*-
|
238
|
-
# your program's manual page goes here
|
239
|
-
```
|
240
|
-
|
241
|
-
You can also write the manual as a multi-line Ruby comment inside a docstring:
|
242
|
-
|
243
|
-
```python
|
244
|
-
#!/usr/bin/env python
|
245
|
-
"""
|
246
|
-
=begin
|
247
|
-
your program's manual page goes here
|
248
|
-
=end
|
249
|
-
"""
|
250
|
-
```
|
251
|
-
|
252
|
-
You can also specify your program's source file encoding above the manual:
|
253
|
-
|
254
|
-
```python
|
255
|
-
#!/usr/bin/env python
|
256
|
-
# -*- coding: utf-8 -*-
|
257
|
-
"""
|
258
|
-
=begin
|
259
|
-
your program's manual page goes here
|
260
|
-
=end
|
261
|
-
"""
|
262
|
-
```
|
263
|
-
|
264
|
-
### Inside an AWK script
|
265
|
-
|
266
|
-
The technique for determining current AWK script file name [comes from here](
|
267
|
-
http://www.mombu.com/programming/programming/t-the-name-of-script-itself-2040784-print.html
|
268
|
-
).
|
269
|
-
|
270
|
-
```awk
|
271
|
-
#!/usr/bin/awk -f
|
272
|
-
# your program's manual page goes here
|
273
|
-
|
274
|
-
# OPTION 1: show manual and exit if ARGV has -h or --help except after --
|
275
|
-
BEGIN {getline c <"/proc/self/cmdline"; sub(".*-f\0"," ",c); gsub("\0"," ",c);
|
276
|
-
if(system("binman help" c) == 0){ exit }}
|
277
|
-
|
278
|
-
# OPTION 2: show manual unconditionally
|
279
|
-
BEGIN {getline c <"/proc/self/cmdline"; sub(".*-f\0"," ",c); sub("\0.*","",c);
|
280
|
-
system("binman show" c)}
|
281
|
-
```
|
282
|
-
|
283
|
-
### Inside a Tcl script
|
284
|
-
|
285
|
-
```tcl
|
286
|
-
#!/usr/bin/env tclsh
|
287
|
-
# your program's manual page goes here
|
288
|
-
|
289
|
-
# OPTION 1: show manual and exit if ARGV has -h or --help except after --
|
290
|
-
if {![catch {exec -- >/dev/tty binman help $argv0 {*}$argv}]} {exit}
|
291
|
-
|
292
|
-
# OPTION 2: show manual unconditionally
|
293
|
-
exec >/dev/tty binman show $argv0
|
294
|
-
```
|
295
|
-
|
296
|
-
You can also write the manual as a multi-line Ruby comment inside an `if 0`:
|
297
|
-
|
298
|
-
```tcl
|
299
|
-
#!/usr/bin/env tclsh
|
300
|
-
if 0 {
|
301
|
-
=begin
|
302
|
-
your program's manual page goes here
|
303
|
-
=end
|
304
|
-
}
|
305
|
-
```
|
306
|
-
|
307
|
-
### Inside a Node.js script
|
308
|
-
|
309
|
-
```javascript
|
310
|
-
/*
|
311
|
-
=begin
|
312
|
-
your program's manual page goes here
|
313
|
-
=end
|
314
|
-
*/
|
315
|
-
|
316
|
-
var exec = require('child_process').exec;
|
317
|
-
|
318
|
-
// OPTION 1: show manual and exit if ARGV has -h or --help except after --
|
319
|
-
exec(['>/dev/tty', 'binman', 'help', __filename].concat(process.argv).
|
320
|
-
join(' '), function(error){ if (error === null){ process.exit(); } });
|
321
|
-
|
322
|
-
// OPTION 2: show manual unconditionally
|
323
|
-
exec(['>/dev/tty', 'binman', 'show', __filename].join(' '));
|
324
|
-
```
|
325
|
-
|
326
|
-
## Packaging
|
327
|
-
|
328
|
-
### Building man pages
|
329
|
-
|
330
|
-
#### At the command line
|
331
|
-
|
332
|
-
See binman-rake(1) manual:
|
333
|
-
|
334
|
-
```sh
|
335
|
-
binman-rake --help
|
336
|
-
```
|
337
|
-
|
338
|
-
#### Inside a Ruby script
|
339
|
-
|
340
|
-
Add this snippet to your gemspec file:
|
341
|
-
|
342
|
-
```ruby
|
343
|
-
s.files += Dir['man/man?/*.?'] # UNIX man pages
|
344
|
-
s.files += Dir['man/**/*.{html,css,js}'] # HTML man pages
|
345
|
-
s.add_development_dependency 'md2man', '~> 4.0'
|
346
|
-
```
|
347
|
-
|
348
|
-
Add the following line to your Rakefile:
|
349
|
-
|
350
|
-
```ruby
|
351
|
-
require 'binman/rakefile'
|
352
|
-
```
|
353
|
-
|
354
|
-
You now have a `rake binman` task that pre-builds UNIX manual page files for
|
355
|
-
your `bin/` scripts into a `man/` directory so that your end-users do not need
|
356
|
-
[md2man] installed in order to view the manual pages you've embedded therein!
|
357
|
-
There are also sub-tasks to build manual pages individually as [roff] or HTML.
|
358
|
-
|
359
|
-
If you're using Bundler, this task also hooks into its gem packaging tasks and
|
360
|
-
ensures that your UNIX manual pages are pre-built and packaged into your gem:
|
361
|
-
|
362
|
-
```shell
|
363
|
-
bundle exec rake build
|
364
|
-
gem spec pkg/*.gem | fgrep man/man
|
365
|
-
```
|
366
|
-
|
367
|
-
## License
|
368
|
-
|
369
|
-
Released under the ISC license. See the LICENSE file for details.
|
370
|
-
|
371
|
-
[roff]: http://troff.org
|
372
|
-
[binman]: https://github.com/sunaku/binman
|
373
|
-
[binman-man]: https://sunaku.github.io/binman/man/man1/binman.1.html
|
374
|
-
[binman-api]: http://rubydoc.info/gems/binman/frames
|
375
|
-
[md2man]: https://github.com/sunaku/md2man
|
376
|
-
[md2man-markdown]: https://sunaku.github.io/md2man/man/man5/md2man.5.html
|
data/man/man0/VERSION.markdown
DELETED
@@ -1,290 +0,0 @@
|
|
1
|
-
## Version 4.0.0 (2014-10-26)
|
2
|
-
|
3
|
-
### Major:
|
4
|
-
|
5
|
-
* binman(1): Rename the `load` command to `snip` and remove `conv`.
|
6
|
-
|
7
|
-
* The `binman conv` command has been removed; use `md2man-roff` instead.
|
8
|
-
|
9
|
-
* We no longer require a specific md2man version at runtime; any will do.
|
10
|
-
|
11
|
-
* Upgrade to md2man 4.0, which no longer expands cross references in code
|
12
|
-
spans and code blocks. Your manuals might be rendered differently now.
|
13
|
-
|
14
|
-
## Version 3.4.1 (2014-07-01)
|
15
|
-
|
16
|
-
This release fixes the help options' REGEXP argument under non-Debian systems.
|
17
|
-
|
18
|
-
### Patch:
|
19
|
-
|
20
|
-
* pager(1) isn't a universal command: CentOS uses `less -is` instead.
|
21
|
-
|
22
|
-
* Silence man(1) stderr when displaying dynamically extracted manual.
|
23
|
-
|
24
|
-
### Other:
|
25
|
-
|
26
|
-
* README: add intro hook and source+result examples.
|
27
|
-
|
28
|
-
* Document REGEXP argument for help options in `bin/*`.
|
29
|
-
|
30
|
-
* Refer to REGEXP argument as PATTERN like less does.
|
31
|
-
|
32
|
-
## Version 3.4.0 (2014-06-29)
|
33
|
-
|
34
|
-
### Minor:
|
35
|
-
|
36
|
-
* GH-3: add optional regexp argument to `-h`/`--help` to search in man(1).
|
37
|
-
|
38
|
-
The `-h` and `--help` options in `BinMan.help()` can now be optionally
|
39
|
-
followed by a regular expression argument that specifies text to search
|
40
|
-
for and, if found, jump to inside the displayed UNIX man page. Such a
|
41
|
-
regular expression argument can now also be passed into `BinMan.show()`.
|
42
|
-
|
43
|
-
### Other:
|
44
|
-
|
45
|
-
* README: add syntax highlighting to code snippets.
|
46
|
-
|
47
|
-
## Version 3.3.3 (2014-06-22)
|
48
|
-
|
49
|
-
This release upgrades to md2man 3.0 for improved HTML manuals.
|
50
|
-
|
51
|
-
### Other:
|
52
|
-
|
53
|
-
* README: add links to package, manuals, and GitHub.
|
54
|
-
|
55
|
-
* GitHub now supports relative links from the README:
|
56
|
-
|
57
|
-
https://help.github.com/articles/relative-links-in-readmes
|
58
|
-
|
59
|
-
* Upgrade to md2man 3.0 for improved HTML manuals.
|
60
|
-
|
61
|
-
## Version 3.3.2 (2013-08-30)
|
62
|
-
|
63
|
-
Patch:
|
64
|
-
|
65
|
-
* Rescue error when designated opener is not found:
|
66
|
-
|
67
|
-
$ binman -h
|
68
|
-
/gems/opener-0.1.0/lib/opener.rb:97:in `spawn': No such file or directory - xdg-open (Errno::ENOENT)
|
69
|
-
from /gems/opener-0.1.0/lib/opener.rb:97:in `spawn'
|
70
|
-
from /gems/binman-3.3.1/lib/binman.rb:57:in `block in show'
|
71
|
-
from /gems/binman-3.3.1/lib/binman.rb:55:in `each'
|
72
|
-
from /gems/binman-3.3.1/lib/binman.rb:55:in `show'
|
73
|
-
from /gems/binman-3.3.1/lib/binman.rb:88:in `help'
|
74
|
-
from /gems/binman-3.3.1/bin/binman:106:in `<top (required)>'
|
75
|
-
from /bin/binman:23:in `load'
|
76
|
-
from /bin/binman:23:in `<main>'
|
77
|
-
|
78
|
-
* Fix an undefined local variable or method error:
|
79
|
-
|
80
|
-
binman: undefined local variable or method `library' for BinMan:Module
|
81
|
-
|
82
|
-
Other:
|
83
|
-
|
84
|
-
* Add screenshot to git repo since OmpLoader is dead.
|
85
|
-
|
86
|
-
## Version 3.3.1 (2013-06-01)
|
87
|
-
|
88
|
-
Patch:
|
89
|
-
|
90
|
-
* Ensure that md2man 2.0 is loaded before running any BinMan rake tasks.
|
91
|
-
|
92
|
-
## Version 3.3.0 (2013-05-08)
|
93
|
-
|
94
|
-
Minor:
|
95
|
-
|
96
|
-
* Add binman-rake(1) script to provide access to `binman/rakefile` tasks.
|
97
|
-
|
98
|
-
* Always try showing HTML manual page in web browser from `BinMan.show()`.
|
99
|
-
|
100
|
-
Other:
|
101
|
-
|
102
|
-
* Upgrade to md2man 2.0.0.
|
103
|
-
|
104
|
-
* Rename HISTORY to VERSION so it sorts after README.
|
105
|
-
|
106
|
-
* Add man/man0/ subdir containing README and VERSION.
|
107
|
-
|
108
|
-
## Version 3.2.1 (2013-05-04)
|
109
|
-
|
110
|
-
Patch:
|
111
|
-
|
112
|
-
* Ensure that the `binman:web` Rake task works the first time through.
|
113
|
-
|
114
|
-
* Fix "uninitialized constant Md2Man::VERSION" errors in `binman/rakefile`.
|
115
|
-
|
116
|
-
* Hook into the `build` Rake task only if Bundler's Rake tasks are loaded:
|
117
|
-
|
118
|
-
https://github.com/sunaku/md2man/pull/7#issuecomment-9467621
|
119
|
-
|
120
|
-
Thanks to Postmodern for raising this issue.
|
121
|
-
|
122
|
-
## Version 3.2.0 (2012-10-14)
|
123
|
-
|
124
|
-
Minor:
|
125
|
-
|
126
|
-
* add binman:web task to produce man pages in HTML
|
127
|
-
|
128
|
-
Other:
|
129
|
-
|
130
|
-
* gemspec: package only roff files from inside man/
|
131
|
-
|
132
|
-
## Version 3.1.1 (2012-10-13)
|
133
|
-
|
134
|
-
Patch:
|
135
|
-
|
136
|
-
* load() failed when leading comment header missing
|
137
|
-
|
138
|
-
* lstrip() is too powerful; consume lines carefully
|
139
|
-
|
140
|
-
Other:
|
141
|
-
|
142
|
-
* fix broken link to redcarpet library home page
|
143
|
-
|
144
|
-
## Version 3.1.0 (2012-02-06)
|
145
|
-
|
146
|
-
Minor:
|
147
|
-
|
148
|
-
* Added `binman help` command for use by non-Ruby bin scripts. See README
|
149
|
-
for usage examples from Perl, Python, Node.js, Tcl, AWK, and UNIX shell!
|
150
|
-
|
151
|
-
Patch:
|
152
|
-
|
153
|
-
* Replace `gem install binman --development` tip in `BinMan::conv()` with
|
154
|
-
`gem install md2man` tip because the former just hangs in RubyGems 1.8.
|
155
|
-
|
156
|
-
Other:
|
157
|
-
|
158
|
-
* Shorten markdown headings; improve documentation; clean up.
|
159
|
-
|
160
|
-
## Version 3.0.1 (2012-02-02)
|
161
|
-
|
162
|
-
Patch:
|
163
|
-
|
164
|
-
* BinMan.help(): ignore `-h` and `--help` options after standard `--` flag.
|
165
|
-
|
166
|
-
* BinMan.show(): write temp file because not all systems support `man -l`.
|
167
|
-
|
168
|
-
Other:
|
169
|
-
|
170
|
-
* HISTORY: group changes by version number components.
|
171
|
-
|
172
|
-
* README: add instructions on pre-building man pages.
|
173
|
-
|
174
|
-
* README: fix installation commands for development.
|
175
|
-
|
176
|
-
* bundler suggests moving all dev deps into gemspec.
|
177
|
-
|
178
|
-
## Version 3.0.0 (2012-01-09)
|
179
|
-
|
180
|
-
Major:
|
181
|
-
|
182
|
-
* Removed the `binman/gemspec` helper library because it did not play well
|
183
|
-
with Bundler. Use the standard `add_runtime_dependency` method instead.
|
184
|
-
[This example][1] shows what work is involved in upgrading.
|
185
|
-
|
186
|
-
Minor:
|
187
|
-
|
188
|
-
* The `binman/Rakefile` helper library now hooks into Bundler's Rake tasks.
|
189
|
-
Be sure to add the `man/**/*` files to your gemspec [accordingly][1].
|
190
|
-
|
191
|
-
[1]: https://github.com/sunaku/md2man/commit/75d7a0064fa86f1c98dd01391ad82245fd387c20
|
192
|
-
|
193
|
-
## Version 2.0.0 (2011-12-06)
|
194
|
-
|
195
|
-
Major:
|
196
|
-
|
197
|
-
* Removed the deprecated `binman/rake_tasks` helper library. Use
|
198
|
-
`binman/rakefile` instead.
|
199
|
-
|
200
|
-
Patch:
|
201
|
-
|
202
|
-
* Fixed infinite looping in the `binman/gemspec` helper library.
|
203
|
-
|
204
|
-
Other:
|
205
|
-
|
206
|
-
* Upgraded to md2man v1 for Markdown to UNIX man page conversion.
|
207
|
-
|
208
|
-
* Do not hard-code the version number in `binman/gemspec` helper.
|
209
|
-
|
210
|
-
## Version 1.1.0 (2011-11-05)
|
211
|
-
|
212
|
-
Alert:
|
213
|
-
|
214
|
-
* The `binman/rake_tasks` library has been renamed (with deprecation) to
|
215
|
-
`binman/rakefile`. The deprecation warning will be removed in the next
|
216
|
-
major release.
|
217
|
-
|
218
|
-
Minor:
|
219
|
-
|
220
|
-
* Add `binman/gemspec` packaging convenience library which automatically
|
221
|
-
builds and includes your UNIX man page files in your gem packages and also
|
222
|
-
adds binman as a runtime and development gem dependency.
|
223
|
-
|
224
|
-
## Version 1.0.0 (2011-10-13)
|
225
|
-
|
226
|
-
Major:
|
227
|
-
|
228
|
-
* The `BinMan::dump()` method and corresponding `binman dump` command now
|
229
|
-
extract the leading comment header from their input before returning the
|
230
|
-
markdown to roff conversion thereof.
|
231
|
-
|
232
|
-
* The `BinMan::read()` method and corresponding `binman read` command have
|
233
|
-
been renamed to `BinMan::load()` and `binman load` respectively.
|
234
|
-
|
235
|
-
Minor:
|
236
|
-
|
237
|
-
* Added `BinMan::conv()` method and corresponding `binman conv` command to
|
238
|
-
encapsulate the markdown to roff conversion process.
|
239
|
-
|
240
|
-
Patch:
|
241
|
-
|
242
|
-
* Pre-built man pages included alongside a `bin/` script were not displayed.
|
243
|
-
Instead, binman was (incorrectly) always trying to convert the leading
|
244
|
-
comment header from the `bin/` script into a UNIX man page for display.
|
245
|
-
|
246
|
-
Other:
|
247
|
-
|
248
|
-
* README: explain dev deps and `man/` dir packaging.
|
249
|
-
|
250
|
-
## Version 0.1.2 (2011-10-13)
|
251
|
-
|
252
|
-
Minor:
|
253
|
-
|
254
|
-
* The [Redcarpet2] library is not a runtime gem dependency anymore.
|
255
|
-
|
256
|
-
Other:
|
257
|
-
|
258
|
-
* Extracted `BinMan::Renderer` into [redcarpet-manpage] library.
|
259
|
-
|
260
|
-
* Forgot to introduce leading comment headers in binman(1) man page.
|
261
|
-
|
262
|
-
[Redcarpet2]: https://github.com/tanoku/redcarpet
|
263
|
-
[redcarpet-manpage]: http://rdoc.info/github/sunaku/redcarpet-manpage
|
264
|
-
|
265
|
-
## Version 0.1.1 (2011-10-13)
|
266
|
-
|
267
|
-
Minor:
|
268
|
-
|
269
|
-
* `BinMan.read()` now supports embedded document (=begin/=end) comments
|
270
|
-
also. See binman(1) for the new description of leading comment headers.
|
271
|
-
|
272
|
-
Patch:
|
273
|
-
|
274
|
-
* Ignore encoding comment line after shebang line.
|
275
|
-
|
276
|
-
* roff: fix first paragraphs inside list items.
|
277
|
-
|
278
|
-
Other:
|
279
|
-
|
280
|
-
* gemspec: build man page files before building gem.
|
281
|
-
|
282
|
-
* binman: raise error and suggest --help option.
|
283
|
-
|
284
|
-
* README: add link to example of binman markdown.
|
285
|
-
|
286
|
-
* README: add obligatory screenshot! >:-)
|
287
|
-
|
288
|
-
## Version 0.0.1 (2011-10-12)
|
289
|
-
|
290
|
-
First release! Happy birthday! Woohoo! :-)
|