ronn 0.6.6 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. data/CHANGES +34 -0
  2. data/INSTALLING +18 -0
  3. data/README.md +43 -69
  4. data/Rakefile +9 -10
  5. data/bin/ronn +66 -49
  6. data/config.ru +1 -1
  7. data/lib/ronn.rb +35 -9
  8. data/lib/ronn/document.rb +239 -135
  9. data/lib/ronn/index.rb +183 -0
  10. data/lib/ronn/roff.rb +48 -28
  11. data/lib/ronn/template.rb +22 -8
  12. data/lib/ronn/template/dark.css +1 -4
  13. data/lib/ronn/template/default.html +0 -2
  14. data/lib/ronn/template/man.css +12 -12
  15. data/lib/ronn/utils.rb +8 -0
  16. data/man/index.html +78 -0
  17. data/man/index.txt +15 -0
  18. data/man/{ronn.5 → ronn-format.7} +26 -30
  19. data/man/{ronn.5.ronn → ronn-format.7.ronn} +39 -39
  20. data/man/ronn.1 +47 -15
  21. data/man/ronn.1.ronn +53 -23
  22. data/ronn.gemspec +14 -8
  23. data/test/angle_bracket_syntax.html +4 -2
  24. data/test/basic_document.html +4 -2
  25. data/test/custom_title_document.html +1 -2
  26. data/test/definition_list_syntax.html +4 -2
  27. data/test/dots_at_line_start_test.roff +10 -0
  28. data/test/dots_at_line_start_test.ronn +4 -0
  29. data/test/entity_encoding_test.html +24 -2
  30. data/test/entity_encoding_test.roff +41 -1
  31. data/test/entity_encoding_test.ronn +17 -0
  32. data/test/index.txt +8 -0
  33. data/test/markdown_syntax.html +5 -3
  34. data/test/markdown_syntax.roff +4 -4
  35. data/test/middle_paragraph.html +4 -2
  36. data/test/missing_spaces.roff +3 -0
  37. data/test/section_reference_links.html +4 -2
  38. data/test/{ronn_test.rb → test_ronn.rb} +18 -5
  39. data/test/{document_test.rb → test_ronn_document.rb} +59 -8
  40. data/test/test_ronn_index.rb +73 -0
  41. data/test/titleless_document.html +7 -2
  42. data/test/titleless_document.ronn +3 -2
  43. data/test/underline_spacing_test.roff +5 -0
  44. metadata +30 -14
  45. data/man/ronn.7 +0 -168
  46. data/man/ronn.7.ronn +0 -120
@@ -1,5 +1,8 @@
1
1
  .TH "MISSING_SPACES" "" "January 1979" "" ""
2
2
  .
3
+ .SH "NAME"
4
+ \fBmissing_spaces\fR
5
+ .
3
6
  .TP
4
7
  \fB\-S\fR \fItext\fR, \fBsearch\fR \fItext\fR
5
8
  Performs a substring search of formula names for \fItext\fR\.
@@ -1,6 +1,8 @@
1
1
  <div class='mp'>
2
- <h2 id='NAME'>NAME</h2>
3
- <p><code>section_reference_links</code> - linking to sections</p>
2
+ <h2 id="NAME">NAME</h2>
3
+ <p class="man-name">
4
+ <code>section_reference_links</code> - <span class="man-whatis">linking to sections</span>
5
+ </p>
4
6
 
5
7
  <h2 id="SECTION-1">SECTION 1</h2>
6
8
 
@@ -18,8 +18,8 @@ class RonnTest < Test::Unit::TestCase
18
18
  output = `echo '# hello(1) -- hello world' | ronn --date=2009-11-23`
19
19
  lines = output.split("\n")
20
20
  assert_equal 7, lines.size
21
- assert_equal %[.\\" generated with Ronn/v#{Ronn::VERSION}], lines.shift
22
- assert_equal %[.\\" http://github.com/rtomayko/ronn/], lines.shift
21
+ assert_equal %[.\\" generated with Ronn/v#{Ronn::version}], lines.shift
22
+ assert_equal %[.\\" http://github.com/rtomayko/ronn/tree/#{Ronn::revision}], lines.shift
23
23
  assert_equal %[.], lines.shift
24
24
  assert_equal %[.TH "HELLO" "1" "November 2009" "" ""], lines.shift
25
25
  assert_equal %[.], lines.shift
@@ -28,15 +28,28 @@ class RonnTest < Test::Unit::TestCase
28
28
  assert_equal 0, lines.size
29
29
  end
30
30
 
31
+ def canonicalize(text)
32
+ text.
33
+ gsub(/^ +/, '').
34
+ gsub(/\n/m, '').
35
+ gsub(/ +/, ' ').
36
+ gsub(/"/, "'")
37
+ end
38
+
31
39
  test "produces html instead of roff with the --html argument" do
32
40
  output = `echo '# hello(1) -- hello world' | ronn --html`
33
- assert_match(/<h2 id='NAME'>NAME<\/h2>/, output)
41
+ assert_match(/<h2 id='NAME'>NAME<\/h2>/, canonicalize(output))
34
42
  end
35
43
 
36
44
  test "produces html fragment with the --fragment argument" do
37
45
  output = `echo '# hello(1) -- hello world' | ronn --fragment`
38
- assert_equal "<div class='mp'>\n<h2 id='NAME'>NAME</h2>\n<p><code>hello</code> - hello world</p>\n\n</div>\n",
39
- output
46
+ assert_equal [
47
+ "<div class='mp'>",
48
+ "<h2 id='NAME'>NAME</h2>",
49
+ "<p class='man-name'><code>hello</code>",
50
+ " - <span class='man-whatis'>hello world</span>",
51
+ "</p></div>"
52
+ ].join, canonicalize(output)
40
53
  end
41
54
 
42
55
  test "abbides by the RONN_MANUAL environment variable" do
@@ -4,6 +4,14 @@ require 'ronn/document'
4
4
  class DocumentTest < Test::Unit::TestCase
5
5
  SIMPLE_FILE = "#{File.dirname(__FILE__)}/basic_document.ronn"
6
6
 
7
+ def canonicalize(text)
8
+ text.
9
+ gsub(/^ +/, '').
10
+ gsub(/\n/m, '').
11
+ gsub(/ +/, ' ').
12
+ gsub(/"/, "'")
13
+ end
14
+
7
15
  test "new with path" do
8
16
  doc = Ronn::Document.new(SIMPLE_FILE)
9
17
  assert_equal File.read(SIMPLE_FILE), doc.data
@@ -70,7 +78,9 @@ class DocumentTest < Test::Unit::TestCase
70
78
 
71
79
  context "simple conventionally named document" do
72
80
  setup do
81
+ @now = Time.now
73
82
  @doc = Ronn::Document.new('hello.1.ronn') { "# hello(1) -- hello world" }
83
+ @doc.date = @now
74
84
  end
75
85
 
76
86
  should "load data" do
@@ -86,19 +96,19 @@ class DocumentTest < Test::Unit::TestCase
86
96
  end
87
97
 
88
98
  should "convert to an HTML fragment with no wrap div" do
89
- assert_equal %[<h2 id='NAME'>NAME</h2>\n<p><code>hello</code> - hello world</p>\n],
90
- @doc.to_html_fragment(wrap=nil)
99
+ assert_equal %[<h2 id='NAME'>NAME</h2><p class='man-name'><code>hello</code> - <span class='man-whatis'>hello world</span></p>],
100
+ canonicalize(@doc.to_html_fragment(wrap=nil))
91
101
  end
92
102
 
93
103
  should "convert to an HTML fragment with a wrap class" do
94
- assert_equal %[<div class='pm'>\n<h2 id='NAME'>NAME</h2>\n<p><code>hello</code> - hello world</p>\n\n</div>],
95
- @doc.to_html_fragment(wrap_class='pm')
104
+ assert_equal %[<div class='pm'><h2 id='NAME'>NAME</h2><p class='man-name'><code>hello</code> - <span class='man-whatis'>hello world</span></p></div>],
105
+ canonicalize(@doc.to_html_fragment(wrap_class='pm'))
96
106
  end
97
107
 
98
108
  should "convert to HTML with a layout" do
99
109
  assert_match %r{^<!DOCTYPE html.*}m, @doc.to_html
100
- assert_match %[<h2 id='NAME'>NAME</h2>\n<p><code>hello</code> - hello world</p>],
101
- @doc.to_html
110
+ assert_match %[<h2 id='NAME'>NAME</h2><p class='man-name'><code>hello</code> - <span class='man-whatis'>hello world</span></p>],
111
+ canonicalize(@doc.to_html)
102
112
  end
103
113
 
104
114
  should "construct a path to related documents" do
@@ -111,9 +121,50 @@ class DocumentTest < Test::Unit::TestCase
111
121
  test "uses default styles" do
112
122
  assert_equal %w[man], @doc.styles
113
123
  end
124
+
125
+ test "converting to a hash" do
126
+ assert_equal({
127
+ "section" => "1",
128
+ "name" => "hello",
129
+ "date" => @now,
130
+ "tagline" => "hello world",
131
+ "styles" => ["man"],
132
+ "toc" => [["NAME", "NAME"]],
133
+ "organization" => nil,
134
+ "manual" => nil
135
+ }, @doc.to_h)
136
+ end
137
+
138
+ test "converting to yaml" do
139
+ require 'yaml'
140
+ assert_equal({
141
+ "section" => "1",
142
+ "name" => "hello",
143
+ "date" => @now,
144
+ "tagline" => "hello world",
145
+ "styles" => ["man"],
146
+ "toc" => [["NAME", "NAME"]],
147
+ "organization" => nil,
148
+ "manual" => nil
149
+ }, YAML.load(@doc.to_yaml))
150
+ end
151
+
152
+ test "converting to json" do
153
+ require 'json'
154
+ assert_equal({
155
+ "section" => "1",
156
+ "name" => "hello",
157
+ "date" => @now.iso8601,
158
+ "tagline" => "hello world",
159
+ "styles" => ["man"],
160
+ "toc" => [["NAME", "NAME"]],
161
+ "organization" => nil,
162
+ "manual" => nil
163
+ }, JSON.parse(@doc.to_json))
164
+ end
114
165
  end
115
166
 
116
- test 'extracting section heads' do
167
+ test 'extracting toc' do
117
168
  @doc = Ronn::Document.new(File.expand_path('../markdown_syntax.ronn', __FILE__))
118
169
  expected = [
119
170
  ["NAME", "NAME"],
@@ -125,7 +176,7 @@ class DocumentTest < Test::Unit::TestCase
125
176
  ["AUTHOR", "AUTHOR"],
126
177
  ["SEE-ALSO", "SEE ALSO"]
127
178
  ]
128
- assert_equal expected, @doc.section_heads
179
+ assert_equal expected, @doc.toc
129
180
  end
130
181
 
131
182
  test "passing a list of styles" do
@@ -0,0 +1,73 @@
1
+ require 'contest'
2
+ require 'ronn'
3
+
4
+ class IndexTest < Test::Unit::TestCase
5
+ setup do
6
+ @index_path = File.expand_path('../index.txt', __FILE__)
7
+ @missing_path = File.expand_path('../missing-index.txt', __FILE__)
8
+ end
9
+
10
+ def expand_path(path, rel=File.dirname(__FILE__))
11
+ File.expand_path(path, rel)
12
+ end
13
+
14
+ test "creating with a non-existant file" do
15
+ index = Ronn::Index.new(@missing_path)
16
+ assert_equal @missing_path, index.path
17
+ assert_equal 0, index.size
18
+ assert index.empty?
19
+ end
20
+
21
+ test "creating with an index file and no block" do
22
+ index = Ronn::Index.new(@index_path)
23
+ assert_equal 3, index.size
24
+ assert_equal 2, index.manuals.size
25
+
26
+ ref = index.references[0]
27
+ assert_equal 'basic_document(7)', ref.name
28
+ assert_equal 'basic_document.ronn', ref.location
29
+ assert_equal 'basic_document.html', ref.url
30
+ assert_equal expand_path('basic_document.ronn'), ref.path
31
+ assert ref.manual?
32
+ assert ref.ronn?
33
+ assert !ref.remote?
34
+
35
+ ref = index.references[1]
36
+ assert_equal 'definition_list_syntax(5)', ref.name
37
+ assert_equal 'definition_list_syntax.ronn', ref.location
38
+ assert_equal 'definition_list_syntax.html', ref.url
39
+ assert_equal expand_path('definition_list_syntax.ronn'), ref.path
40
+
41
+ ref = index.references[2]
42
+ assert_equal 'grep(1)', ref.name
43
+ assert_equal 'http://man.cx/grep(1)', ref.url
44
+ assert ref.manual?
45
+ assert ref.remote?
46
+ assert !ref.ronn?
47
+ end
48
+
49
+ test "creating with a block reader" do
50
+ index = Ronn::Index.new(@index_path) { "hello(1) hello.1.ronn" }
51
+ assert_equal @index_path, index.path
52
+ assert_equal 1, index.size
53
+ ref = index.first
54
+ assert_equal 'hello(1)', ref.name
55
+ assert_equal 'hello.1.ronn', ref.location
56
+ assert_equal 'hello.1.html', ref.url
57
+ assert_equal expand_path('hello.1.ronn'), ref.path
58
+ end
59
+
60
+ test "adding manual paths" do
61
+ index = Ronn::Index.new(@index_path)
62
+ index << expand_path("angle_bracket_syntax.ronn")
63
+ assert_equal 'angle_bracket_syntax(5)', index.last.name
64
+ assert_equal expand_path('angle_bracket_syntax.ronn'), index.last.path
65
+ end
66
+
67
+ test "adding manual paths that are already present" do
68
+ index = Ronn::Index.new(@index_path)
69
+ size = index.size
70
+ index << expand_path("basic_document.ronn")
71
+ assert_equal size, index.size
72
+ end
73
+ end
@@ -1,5 +1,10 @@
1
1
  <div class='mp'>
2
- <p>This is a document without a level 1 heading. It doesn't output
3
- a <code>NAME</code> section or custom <code>&lt;h1&gt;</code>.</p>
2
+ <h2 id="NAME">NAME</h2>
3
+ <p class="man-name">
4
+ <code>titleless_document</code>
5
+ </p>
6
+ <p>This is a document without a level 1 heading. It generates
7
+ a <code>NAME</code> section from the filename but does not include an
8
+ <code>&lt;h1&gt;</code> element.</p>
4
9
 
5
10
  </div>
@@ -1,2 +1,3 @@
1
- This is a document without a level 1 heading. It doesn't output
2
- a `NAME` section or custom `<h1>`.
1
+ This is a document without a level 1 heading. It generates
2
+ a `NAME` section from the filename but does not include an
3
+ `<h1>` element.
@@ -1,4 +1,9 @@
1
1
  .TH "UNDERLINE_SPACING_TEST" "" "January 1979" "" ""
2
+ .
3
+ .SH "NAME"
4
+ \fBunderline_spacing_test\fR
5
+ .
6
+ .P
2
7
  This input
3
8
  .
4
9
  .TP
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ronn
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 3
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
- - 6
8
- - 6
9
- version: 0.6.6
8
+ - 7
9
+ - 0
10
+ version: 0.7.0
10
11
  platform: ruby
11
12
  authors:
12
13
  - Ryan Tomayko
@@ -14,16 +15,18 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-06-13 00:00:00 -07:00
18
+ date: 2010-06-21 00:00:00 -07:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
21
22
  name: hpricot
22
23
  prerelease: false
23
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
24
26
  requirements:
25
27
  - - ">="
26
28
  - !ruby/object:Gem::Version
29
+ hash: 59
27
30
  segments:
28
31
  - 0
29
32
  - 8
@@ -35,9 +38,11 @@ dependencies:
35
38
  name: rdiscount
36
39
  prerelease: false
37
40
  requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
38
42
  requirements:
39
43
  - - ">="
40
44
  - !ruby/object:Gem::Version
45
+ hash: 19
41
46
  segments:
42
47
  - 1
43
48
  - 5
@@ -49,9 +54,11 @@ dependencies:
49
54
  name: mustache
50
55
  prerelease: false
51
56
  requirement: &id003 !ruby/object:Gem::Requirement
57
+ none: false
52
58
  requirements:
53
59
  - - ">="
54
60
  - !ruby/object:Gem::Version
61
+ hash: 3
55
62
  segments:
56
63
  - 0
57
64
  - 7
@@ -72,12 +79,14 @@ files:
72
79
  - AUTHORS
73
80
  - CHANGES
74
81
  - COPYING
82
+ - INSTALLING
75
83
  - README.md
76
84
  - Rakefile
77
85
  - bin/ronn
78
86
  - config.ru
79
87
  - lib/ronn.rb
80
88
  - lib/ronn/document.rb
89
+ - lib/ronn/index.rb
81
90
  - lib/ronn/roff.rb
82
91
  - lib/ronn/server.rb
83
92
  - lib/ronn/template.rb
@@ -90,12 +99,12 @@ files:
90
99
  - lib/ronn/template/screen.css
91
100
  - lib/ronn/template/toc.css
92
101
  - lib/ronn/utils.rb
102
+ - man/index.html
103
+ - man/index.txt
104
+ - man/ronn-format.7
105
+ - man/ronn-format.7.ronn
93
106
  - man/ronn.1
94
107
  - man/ronn.1.ronn
95
- - man/ronn.5
96
- - man/ronn.5.ronn
97
- - man/ronn.7
98
- - man/ronn.7.ronn
99
108
  - ronn.gemspec
100
109
  - test/angle_bracket_syntax.html
101
110
  - test/angle_bracket_syntax.ronn
@@ -107,10 +116,12 @@ files:
107
116
  - test/definition_list_syntax.html
108
117
  - test/definition_list_syntax.roff
109
118
  - test/definition_list_syntax.ronn
110
- - test/document_test.rb
119
+ - test/dots_at_line_start_test.roff
120
+ - test/dots_at_line_start_test.ronn
111
121
  - test/entity_encoding_test.html
112
122
  - test/entity_encoding_test.roff
113
123
  - test/entity_encoding_test.ronn
124
+ - test/index.txt
114
125
  - test/markdown_syntax.html
115
126
  - test/markdown_syntax.roff
116
127
  - test/markdown_syntax.ronn
@@ -119,10 +130,12 @@ files:
119
130
  - test/middle_paragraph.ronn
120
131
  - test/missing_spaces.roff
121
132
  - test/missing_spaces.ronn
122
- - test/ronn_test.rb
123
133
  - test/section_reference_links.html
124
134
  - test/section_reference_links.roff
125
135
  - test/section_reference_links.ronn
136
+ - test/test_ronn.rb
137
+ - test/test_ronn_document.rb
138
+ - test/test_ronn_index.rb
126
139
  - test/titleless_document.html
127
140
  - test/titleless_document.ronn
128
141
  - test/underline_spacing_test.roff
@@ -140,26 +153,29 @@ rdoc_options:
140
153
  require_paths:
141
154
  - lib
142
155
  required_ruby_version: !ruby/object:Gem::Requirement
156
+ none: false
143
157
  requirements:
144
158
  - - ">="
145
159
  - !ruby/object:Gem::Version
160
+ hash: 3
146
161
  segments:
147
162
  - 0
148
163
  version: "0"
149
164
  required_rubygems_version: !ruby/object:Gem::Requirement
165
+ none: false
150
166
  requirements:
151
167
  - - ">="
152
168
  - !ruby/object:Gem::Version
169
+ hash: 3
153
170
  segments:
154
171
  - 0
155
172
  version: "0"
156
173
  requirements: []
157
174
 
158
175
  rubyforge_project:
159
- rubygems_version: 1.3.6
176
+ rubygems_version: 1.3.7
160
177
  signing_key:
161
178
  specification_version: 3
162
179
  summary: The opposite of roff
163
- test_files:
164
- - test/document_test.rb
165
- - test/ronn_test.rb
180
+ test_files: []
181
+
data/man/ronn.7 DELETED
@@ -1,168 +0,0 @@
1
- .\" generated with Ronn/v0.6.6
2
- .\" http://github.com/rtomayko/ronn/
3
- .
4
- .TH "RONN" "7" "June 2010" "0.6-6-gd7645f2" "Ronn 0.6.6"
5
- .
6
- .SH "NAME"
7
- \fBronn\fR \- the opposite of roff
8
- .
9
- .SH "DESCRIPTION"
10
- Ronn is a text format and toolchain for creating UNIX manpages\. It converts markdown to standard UNIX roff manpages and formatted HTML manuals for the web\.
11
- .
12
- .P
13
- The source format includes all of Markdown but has a more rigid structure and includes extensions that provide features commonly found in manpages (definition lists, link notation, etc\.)\. The ronn(5) manual page defines the format in detail\.
14
- .
15
- .SH "DOCUMENTATION"
16
- The \fB\.ronn\fR files located under the \fBman/\fR directory show off a wide range of ronn capabilities and are the source of Ronn\'s own documentation\. The source files and generated HTML / roff output files are available at:
17
- .
18
- .IP "\(bu" 4
19
- ronn(1) \fIhttp://rtomayko\.github\.com/ronn/ronn\.1\fR \- convert markdown files to manpages\.
20
- .
21
- .br
22
- source file \fIhttp://github\.com/rtomayko/ronn/blob/master/man/ronn\.1\.ronn\fR, roff output \fIhttp://github\.com/rtomayko/ronn/blob/master/man/ronn\.1\fR
23
- .
24
- .IP "\(bu" 4
25
- ronn(5) \fIhttp://rtomayko\.github\.com/ronn/ronn\.5\fR \- markdown\-based text format for authoring manpages
26
- .
27
- .br
28
- source file \fIhttp://github\.com/rtomayko/ronn/blob/master/man/ronn\.5\.ronn\fR, roff output \fIhttp://github\.com/rtomayko/ronn/blob/master/man/ronn\.5\fR
29
- .
30
- .IP "" 0
31
- .
32
- .SH "INSTALL"
33
- Install with Rubygems:
34
- .
35
- .IP "" 4
36
- .
37
- .nf
38
-
39
- $ [sudo] gem install ronn
40
- $ ronn \-\-help
41
- .
42
- .fi
43
- .
44
- .IP "" 0
45
- .
46
- .P
47
- Or, clone the git repository:
48
- .
49
- .IP "" 4
50
- .
51
- .nf
52
-
53
- $ git clone git://github\.com/rtomayko/ronn\.git
54
- $ PATH=ronn/bin:$PATH
55
- $ ronn \-\-help
56
- .
57
- .fi
58
- .
59
- .IP "" 0
60
- .
61
- .SH "BASIC USAGE"
62
- Build roff and HTML output files for one or more input files:
63
- .
64
- .IP "" 4
65
- .
66
- .nf
67
-
68
- $ ronn man/ronn\.5\.ronn
69
- roff: man/ronn\.5
70
- html: man/ronn\.5\.html
71
- .
72
- .fi
73
- .
74
- .IP "" 0
75
- .
76
- .P
77
- View a roff manpage with man(1):
78
- .
79
- .IP "" 4
80
- .
81
- .nf
82
-
83
- $ man man/ronn\.5
84
- .
85
- .fi
86
- .
87
- .IP "" 0
88
- .
89
- .P
90
- Generate only a standalone HTML version of one or more files:
91
- .
92
- .IP "" 4
93
- .
94
- .nf
95
-
96
- $ ronn \-\-html man/markdown\.5\.ronn
97
- html: man/markdown\.5\.html
98
- .
99
- .fi
100
- .
101
- .IP "" 0
102
- .
103
- .P
104
- Build roff versions of all ronn files in a directory:
105
- .
106
- .IP "" 4
107
- .
108
- .nf
109
-
110
- $ ronn \-\-roff man/*\.ronn
111
- .
112
- .fi
113
- .
114
- .IP "" 0
115
- .
116
- .P
117
- View a ronn file as if it were a manpage without building intermediate files:
118
- .
119
- .IP "" 4
120
- .
121
- .nf
122
-
123
- $ ronn \-\-man man/markdown\.5\.ronn
124
- .
125
- .fi
126
- .
127
- .IP "" 0
128
- .
129
- .P
130
- The ronn(1) \fIhttp://rtomayko\.github\.com/ronn/ronn\.1\fR manual page includes comprehensive documentation on \fBronn\fR command line options\.
131
- .
132
- .SH "ABOUT"
133
- Some people say UNIX manual pages are a poor and outdated style of documentation\. I disagree:
134
- .
135
- .IP "\(bu" 4
136
- Man pages follow a well defined structure that\'s immediately familiar\. This provides developers with a useful starting point when documenting new tools, libraries, and formats\.
137
- .
138
- .IP "\(bu" 4
139
- Man pages get to the point\. Because they\'re written in an inverted style, with a SYNOPSIS section followed by additional detail, prose and references to other sources of information, man pages provide the best of both cheat sheet and reference style documentation\.
140
- .
141
- .IP "\(bu" 4
142
- Man pages have extremely \-\- unbelievably \-\- limited text formatting capabilities\. You get a couple of headings, lists, bold, underline and no more\. This is a feature\.
143
- .
144
- .IP "\(bu" 4
145
- Although two levels of section hierarchy are technically supported, most man pages use only a single level\. Unwieldy document hierarchies complicate otherwise good documentation\. Feynman covered all of physics \-\- heavenly bodies through QED \-\- with only two levels of document hierarchy (\fIThe Feynman Lectures on Physics\fR, 1970)\.
146
- .
147
- .IP "\(bu" 4
148
- Man pages have a simple referencing syntax; e\.g\., sh(1), fork(2), markdown(7)\. HTML versions can use this to generate links between pages\.
149
- .
150
- .IP "\(bu" 4
151
- The classical terminal man page display is typographically well thought out\. Big bold section headings, justified monospace text, nicely indented paragraphs, intelligently aligned definition lists, and an informational header and footer\.
152
- .
153
- .IP "" 0
154
- .
155
- .P
156
- Unfortunately, figuring out how to create a manpage is a fairly tedious process\. The roff/man macro languages are highly extensible, fractured between multiple dialects, and include a bunch of device specific stuff irrelevant to modern publishing tools\.
157
- .
158
- .P
159
- Ronn aims to address many of the issues with manpage creation while preserving the things that makes manpages a great form of documentation\.
160
- .
161
- .SH "COPYING"
162
- Ronn is Copyright (C) 2009 Ryan Tomayko \fIhttp://tomayko\.com/about\fR
163
- .
164
- .br
165
- See the file COPYING for information of licensing and distribution\.
166
- .
167
- .SH "SEE ALSO"
168
- ronn(1) \fIhttp://rtomayko\.github\.com/ronn/ronn\.1\fR, ronn(5) \fIhttp://rtomayko\.github\.com/ronn/ronn\.5\fR, markdown(5)