binman 1.1.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/HISTORY.markdown +19 -0
- data/bin/binman +24 -15
- data/binman.gemspec +1 -1
- data/lib/binman.rb +2 -3
- data/lib/binman/gemspec.rb +4 -3
- data/lib/binman/version.rb +1 -1
- data/man/man1/binman.1 +71 -34
- metadata +7 -8
- data/lib/binman/rake_tasks.rb +0 -2
data/HISTORY.markdown
CHANGED
@@ -1,3 +1,22 @@
|
|
1
|
+
------------------------------------------------------------------------------
|
2
|
+
Version 2.0.0 (2011-12-06)
|
3
|
+
------------------------------------------------------------------------------
|
4
|
+
|
5
|
+
Breaking changes:
|
6
|
+
|
7
|
+
* Removed the deprecated `binman/rake_tasks` helper library. Use
|
8
|
+
`binman/rakefile` instead.
|
9
|
+
|
10
|
+
External changes:
|
11
|
+
|
12
|
+
* Fixed infinite looping in the `binman/gemspec` helper library.
|
13
|
+
|
14
|
+
Internal changes:
|
15
|
+
|
16
|
+
* Upgraded to md2man v1 for Markdown to UNIX man page conversion.
|
17
|
+
|
18
|
+
* Do not hard-code the version number in `binman/gemspec` helper.
|
19
|
+
|
1
20
|
------------------------------------------------------------------------------
|
2
21
|
Version 1.1.0 (2011-11-05)
|
3
22
|
------------------------------------------------------------------------------
|
data/bin/binman
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
# encoding: utf-8
|
3
3
|
=begin
|
4
4
|
|
5
|
-
BINMAN 1 "2011-
|
6
|
-
|
5
|
+
BINMAN 1 "2011-12-06" "2.0.0"
|
6
|
+
=============================
|
7
7
|
|
8
8
|
NAME
|
9
9
|
----
|
@@ -20,7 +20,7 @@ DESCRIPTION
|
|
20
20
|
|
21
21
|
[binman] produces UNIX man pages for your Ruby `bin/` scripts. It can extract
|
22
22
|
their leading comment headers (defined below), convert them from markdown(7)
|
23
|
-
into roff(7) using [Redcarpet2], and display them using man(1).
|
23
|
+
into roff(7) using [md2man] and [Redcarpet2], and display them using man(1).
|
24
24
|
|
25
25
|
### Leading Comment Headers
|
26
26
|
|
@@ -32,24 +32,32 @@ A leading comment header can be one of the following two things:
|
|
32
32
|
|
33
33
|
2. First embedded document delimited by `=begin` and `=end` lines.
|
34
34
|
|
35
|
+
### Markdown Processing Divergence
|
36
|
+
|
37
|
+
Although your leading comment headers are written in markdown(7), `binman
|
38
|
+
conv` introduces the following additions to markdown(7) syntax via [md2man]:
|
39
|
+
|
40
|
+
* There can be at most one top-level heading (H1). It is emitted as `.TH`
|
41
|
+
in the roff(7) output, specifying the UNIX man page's header and footer.
|
42
|
+
|
43
|
+
* Paragraphs whose lines are all uniformly indented by two spaces are
|
44
|
+
considered to be "indented paragraphs". They are unindented accordingly
|
45
|
+
before emission as `.IP` in the roff(7) output.
|
46
|
+
|
47
|
+
* Paragraphs whose subsequent lines (all except the first) are uniformly
|
48
|
+
indented by two spaces are considered to be a "tagged paragraphs". They
|
49
|
+
are unindented accordingly before emission as `.TP` in the roff(7) output.
|
50
|
+
|
35
51
|
### Markdown Processing Extensions
|
36
52
|
|
37
|
-
The following [Redcarpet2]
|
53
|
+
The following [Redcarpet2] extensions for markdown(7) are enabled:
|
38
54
|
|
55
|
+
* tables
|
39
56
|
* autolink
|
57
|
+
* superscript
|
58
|
+
* strikethrough
|
40
59
|
* no_intra_emphasis
|
41
60
|
* fenced_code_blocks
|
42
|
-
* space_after_headers
|
43
|
-
|
44
|
-
### Markdown Processing Divergence
|
45
|
-
|
46
|
-
Although your leading comment headers are written in markdown(7), `binman`
|
47
|
-
introduces the following additional conventions to simplify common tasks:
|
48
|
-
|
49
|
-
1. Paragraphs beginning with bold/italic and followed by at least
|
50
|
-
one two-space indented line are considered to be definitions.
|
51
|
-
The first line of such a paragraph is the term being defined and
|
52
|
-
the subsequent two-space indented lines are the definition body.
|
53
61
|
|
54
62
|
OPTIONS
|
55
63
|
-------
|
@@ -81,6 +89,7 @@ SEE ALSO
|
|
81
89
|
man(1), roff(7), markdown(7)
|
82
90
|
|
83
91
|
[binman]: https://github.com/sunaku/binman
|
92
|
+
[md2man]: https://github.com/sunaku/md2man
|
84
93
|
[Redcarpet2]: https://github.com/tanoku/redcarpet
|
85
94
|
|
86
95
|
=end =========================================================================
|
data/binman.gemspec
CHANGED
@@ -20,5 +20,5 @@ Gem::Specification.new do |s|
|
|
20
20
|
# specify any dependencies here; for example:
|
21
21
|
# s.add_development_dependency "rspec"
|
22
22
|
# s.add_runtime_dependency "rest-client"
|
23
|
-
s.add_development_dependency "
|
23
|
+
s.add_development_dependency "md2man", "~> 1"
|
24
24
|
end
|
data/lib/binman.rb
CHANGED
@@ -31,9 +31,8 @@ module BinMan
|
|
31
31
|
|
32
32
|
# Converts given markdown(7) source into roff(7).
|
33
33
|
def conv source=nil
|
34
|
-
|
35
|
-
|
36
|
-
RedcarpetManpage::RENDERER.render(header)
|
34
|
+
require 'md2man'
|
35
|
+
Md2Man::ENGINE.render(read(source))
|
37
36
|
rescue LoadError
|
38
37
|
raise 'Run `gem install binman --development` to use BinMan::conv().'
|
39
38
|
end
|
data/lib/binman/gemspec.rb
CHANGED
@@ -6,15 +6,16 @@ class Gem::Specification
|
|
6
6
|
_582ab9fd_ffc8_4972_b37f_1a46031a9163(*args, &block)
|
7
7
|
|
8
8
|
# pre-build man page files
|
9
|
-
require 'binman/
|
9
|
+
require 'binman/rakefile'
|
10
10
|
Rake::Task[:binman].invoke
|
11
11
|
|
12
12
|
# and add them to the gem
|
13
13
|
self.files += Dir['man/**/*']
|
14
14
|
|
15
15
|
# add binman as dependency
|
16
|
-
|
17
|
-
|
16
|
+
if self.name and self.name != 'binman'
|
17
|
+
require 'binman/version'
|
18
|
+
binman_gem = ['binman', "~> #{BinMan::VERSION[/\d+/]}"]
|
18
19
|
self.add_runtime_dependency(*binman_gem)
|
19
20
|
binman_vers = Gem::Dependency.new(*binman_gem)
|
20
21
|
binman_spec = Gem::SpecFetcher.fetcher.fetch(binman_vers).flatten.first
|
data/lib/binman/version.rb
CHANGED
data/man/man1/binman.1
CHANGED
@@ -1,61 +1,98 @@
|
|
1
|
-
.TH BINMAN 1 "2011
|
1
|
+
.TH BINMAN 1 "2011\-12\-06" "2.0.0"
|
2
2
|
.SH NAME
|
3
3
|
.PP
|
4
|
-
binman \- UNIX man pages for Ruby \
|
4
|
+
binman \- UNIX man pages for Ruby \fB\fCbin/\fR scripts
|
5
5
|
.SH SYNOPSIS
|
6
6
|
.PP
|
7
|
-
\
|
7
|
+
\fB\fCbinman\fR [\fIOPTION\fP]... \fICOMMAND\fP
|
8
8
|
.SH DESCRIPTION
|
9
9
|
.PP
|
10
|
-
|
10
|
+
binman
|
11
|
+
.UR https://github.com/sunaku/binman
|
12
|
+
.UE
|
13
|
+
produces UNIX man pages for your Ruby \fB\fCbin/\fR scripts. It can extract
|
11
14
|
their leading comment headers (defined below), convert them from
|
12
15
|
.BR markdown (7)
|
13
16
|
into
|
14
17
|
.BR roff (7)
|
15
|
-
using
|
18
|
+
using md2man
|
19
|
+
.UR https://github.com/sunaku/md2man
|
20
|
+
.UE
|
21
|
+
and Redcarpet2
|
22
|
+
.UR https://github.com/tanoku/redcarpet
|
23
|
+
.UE , and display them using
|
16
24
|
.BR man (1).
|
17
25
|
.SS Leading Comment Headers
|
18
26
|
.PP
|
19
27
|
A leading comment header can be one of the following two things:
|
20
|
-
.nr
|
21
|
-
.
|
22
|
-
|
28
|
+
.nr step0 0 1
|
29
|
+
.RS
|
30
|
+
.IP \n+[step0]
|
31
|
+
A contiguous sequence of single\-line comments starting at the
|
23
32
|
beginning of the file (after shebang and encoding comments plus
|
24
33
|
optional blank lines) and ending at the first single blank line.
|
25
|
-
.IP \n+[
|
26
|
-
First embedded document delimited by \fB=begin\
|
34
|
+
.IP \n+[step0]
|
35
|
+
First embedded document delimited by \fB\fC=begin\fR and \fB\fC=end\fR lines.
|
36
|
+
.RE
|
37
|
+
.SS Markdown Processing Divergence
|
38
|
+
.PP
|
39
|
+
Although your leading comment headers are written in
|
40
|
+
.BR markdown (7),
|
41
|
+
\fB\fCbinman
|
42
|
+
conv\fR introduces the following additions to
|
43
|
+
.BR markdown (7)
|
44
|
+
syntax via md2man
|
45
|
+
.UR https://github.com/sunaku/md2man
|
46
|
+
.UE :
|
47
|
+
.RS
|
48
|
+
.IP \(bu 2
|
49
|
+
There can be at most one top\-level heading (H1). It is emitted as \fB\fC.TH\fR
|
50
|
+
in the
|
51
|
+
.BR roff (7)
|
52
|
+
output, specifying the UNIX man page's header and footer.
|
53
|
+
.IP \(bu 2
|
54
|
+
Paragraphs whose lines are all uniformly indented by two spaces are
|
55
|
+
considered to be "indented paragraphs". They are unindented accordingly
|
56
|
+
before emission as \fB\fC.IP\fR in the
|
57
|
+
.BR roff (7)
|
58
|
+
output.
|
59
|
+
.IP \(bu 2
|
60
|
+
Paragraphs whose subsequent lines (all except the first) are uniformly
|
61
|
+
indented by two spaces are considered to be a "tagged paragraphs". They
|
62
|
+
are unindented accordingly before emission as \fB\fC.TP\fR in the
|
63
|
+
.BR roff (7)
|
64
|
+
output.
|
65
|
+
.RE
|
27
66
|
.SS Markdown Processing Extensions
|
28
67
|
.PP
|
29
|
-
The following
|
30
|
-
.
|
31
|
-
.
|
68
|
+
The following Redcarpet2
|
69
|
+
.UR https://github.com/tanoku/redcarpet
|
70
|
+
.UE
|
71
|
+
extensions for
|
72
|
+
.BR markdown (7)
|
73
|
+
are enabled:
|
74
|
+
.RS
|
75
|
+
.IP \(bu 2
|
76
|
+
tables
|
77
|
+
.IP \(bu 2
|
32
78
|
autolink
|
33
|
-
.IP \
|
79
|
+
.IP \(bu 2
|
80
|
+
superscript
|
81
|
+
.IP \(bu 2
|
82
|
+
strikethrough
|
83
|
+
.IP \(bu 2
|
34
84
|
no_intra_emphasis
|
35
|
-
.IP \
|
85
|
+
.IP \(bu 2
|
36
86
|
fenced_code_blocks
|
37
|
-
.
|
38
|
-
space_after_headers
|
39
|
-
.SS Markdown Processing Divergence
|
40
|
-
.PP
|
41
|
-
Although your leading comment headers are written in
|
42
|
-
.BR markdown (7),
|
43
|
-
\fBbinman\fP
|
44
|
-
introduces the following additional conventions to simplify common tasks:
|
45
|
-
.nr step 0 1
|
46
|
-
.IP \n+[step]
|
47
|
-
Paragraphs beginning with bold/italic and followed by at least
|
48
|
-
one two-space indented line are considered to be definitions.
|
49
|
-
The first line of such a paragraph is the term being defined and
|
50
|
-
the subsequent two-space indented lines are the definition body.
|
87
|
+
.RE
|
51
88
|
.SH OPTIONS
|
52
89
|
.TP
|
53
|
-
\fB-h\
|
90
|
+
\fB\fC-h\fR, \fB\fC--help\fR
|
54
91
|
Display this help manual using
|
55
92
|
.BR man (1).
|
56
93
|
.SH COMMANDS
|
57
94
|
.TP
|
58
|
-
\
|
95
|
+
\fB\fCshow\fR [\fIFILE\fP]
|
59
96
|
Use
|
60
97
|
.BR man (1)
|
61
98
|
to display the
|
@@ -63,16 +100,16 @@ to display the
|
|
63
100
|
conversion of the leading comment header
|
64
101
|
extracted from the given \fIFILE\fP or STDIN.
|
65
102
|
.TP
|
66
|
-
\
|
103
|
+
\fB\fCload\fR [\fIFILE\fP]
|
67
104
|
Print the leading comment header extracted from the given \fIFILE\fP or STDIN.
|
68
105
|
.TP
|
69
|
-
\
|
106
|
+
\fB\fCdump\fR [\fIFILE\fP]
|
70
107
|
Print the
|
71
108
|
.BR roff (7)
|
72
109
|
conversion of the leading comment header extracted from
|
73
110
|
the given \fIFILE\fP or STDIN.
|
74
111
|
.TP
|
75
|
-
\
|
112
|
+
\fB\fCconv\fR [\fIFILE\fP]
|
76
113
|
Print the
|
77
114
|
.BR roff (7)
|
78
115
|
conversion of the
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: binman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,19 +9,19 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-
|
12
|
+
date: 2011-12-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
16
|
-
requirement: &
|
15
|
+
name: md2man
|
16
|
+
requirement: &13240480 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
|
-
- -
|
19
|
+
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
21
|
+
version: '1'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *13240480
|
25
25
|
description: ''
|
26
26
|
email:
|
27
27
|
- sunaku@gmail.com
|
@@ -40,7 +40,6 @@ files:
|
|
40
40
|
- binman.gemspec
|
41
41
|
- lib/binman.rb
|
42
42
|
- lib/binman/gemspec.rb
|
43
|
-
- lib/binman/rake_tasks.rb
|
44
43
|
- lib/binman/rakefile.rb
|
45
44
|
- lib/binman/version.rb
|
46
45
|
- man/man1/binman.1
|
data/lib/binman/rake_tasks.rb
DELETED