nronn 0.10.1.pre2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +7 -0
  2. data/AUTHORS +8 -0
  3. data/CHANGES +230 -0
  4. data/Gemfile +2 -0
  5. data/Gemfile.lock +72 -0
  6. data/INSTALLING.md +92 -0
  7. data/LICENSE.txt +12 -0
  8. data/README.md +131 -0
  9. data/Rakefile +153 -0
  10. data/bin/ronn +253 -0
  11. data/completion/bash/ronn +32 -0
  12. data/completion/zsh/_ronn +24 -0
  13. data/config.ru +15 -0
  14. data/lib/ronn/document.rb +530 -0
  15. data/lib/ronn/index.rb +180 -0
  16. data/lib/ronn/roff.rb +393 -0
  17. data/lib/ronn/server.rb +67 -0
  18. data/lib/ronn/template/80c.css +6 -0
  19. data/lib/ronn/template/dark.css +18 -0
  20. data/lib/ronn/template/darktoc.css +17 -0
  21. data/lib/ronn/template/default.html +41 -0
  22. data/lib/ronn/template/man.css +100 -0
  23. data/lib/ronn/template/print.css +5 -0
  24. data/lib/ronn/template/screen.css +105 -0
  25. data/lib/ronn/template/toc.css +27 -0
  26. data/lib/ronn/template.rb +173 -0
  27. data/lib/ronn/utils.rb +57 -0
  28. data/lib/ronn.rb +47 -0
  29. data/man/index.html +78 -0
  30. data/man/index.txt +15 -0
  31. data/man/ronn-format.7 +145 -0
  32. data/man/ronn-format.7.ronn +157 -0
  33. data/man/ronn.1 +227 -0
  34. data/man/ronn.1.ronn +316 -0
  35. data/nronn.gemspec +136 -0
  36. data/test/angle_bracket_syntax.html +27 -0
  37. data/test/angle_bracket_syntax.roff +24 -0
  38. data/test/angle_bracket_syntax.ronn +22 -0
  39. data/test/backticks.html +14 -0
  40. data/test/backticks.ronn +10 -0
  41. data/test/basic_document.html +8 -0
  42. data/test/basic_document.ronn +4 -0
  43. data/test/circumflexes.ronn +1 -0
  44. data/test/code_blocks.html +38 -0
  45. data/test/code_blocks.roff +38 -0
  46. data/test/code_blocks.ronn +41 -0
  47. data/test/code_blocks_regression +19 -0
  48. data/test/code_blocks_regression.html +38 -0
  49. data/test/code_blocks_regression.ronn +40 -0
  50. data/test/contest.rb +70 -0
  51. data/test/custom_title_document.html +6 -0
  52. data/test/custom_title_document.ronn +5 -0
  53. data/test/definition_list_syntax.html +25 -0
  54. data/test/definition_list_syntax.roff +19 -0
  55. data/test/definition_list_syntax.ronn +18 -0
  56. data/test/dots_at_line_start_test.roff +19 -0
  57. data/test/dots_at_line_start_test.ronn +12 -0
  58. data/test/ellipses.roff +7 -0
  59. data/test/ellipses.ronn +7 -0
  60. data/test/entity_encoding_test.html +42 -0
  61. data/test/entity_encoding_test.roff +51 -0
  62. data/test/entity_encoding_test.ronn +34 -0
  63. data/test/index.txt +8 -0
  64. data/test/markdown_syntax.html +954 -0
  65. data/test/markdown_syntax.roff +907 -0
  66. data/test/markdown_syntax.ronn +881 -0
  67. data/test/middle_paragraph.html +14 -0
  68. data/test/middle_paragraph.roff +9 -0
  69. data/test/middle_paragraph.ronn +10 -0
  70. data/test/missing_spaces.roff +7 -0
  71. data/test/missing_spaces.ronn +2 -0
  72. data/test/nested_list.ronn +19 -0
  73. data/test/nested_list_with_code.html +14 -0
  74. data/test/nested_list_with_code.roff +11 -0
  75. data/test/nested_list_with_code.ronn +6 -0
  76. data/test/ordered_list.html +28 -0
  77. data/test/ordered_list.roff +25 -0
  78. data/test/ordered_list.ronn +21 -0
  79. data/test/page.with.periods.in.name.5.ronn +4 -0
  80. data/test/pre_block_with_quotes.roff +8 -0
  81. data/test/pre_block_with_quotes.ronn +6 -0
  82. data/test/section_reference_links.html +16 -0
  83. data/test/section_reference_links.roff +7 -0
  84. data/test/section_reference_links.ronn +12 -0
  85. data/test/single_quotes.html +11 -0
  86. data/test/single_quotes.roff +5 -0
  87. data/test/single_quotes.ronn +9 -0
  88. data/test/tables.ronn +24 -0
  89. data/test/test_ronn.rb +124 -0
  90. data/test/test_ronn_document.rb +186 -0
  91. data/test/test_ronn_index.rb +73 -0
  92. data/test/titleless_document.html +9 -0
  93. data/test/titleless_document.ronn +3 -0
  94. data/test/underline_spacing_test.roff +13 -0
  95. data/test/underline_spacing_test.ronn +11 -0
  96. metadata +309 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 410aa4724fdfc614d9ff8362875481eb7655d37f9d85f0d5bdda18254f3bee08
4
+ data.tar.gz: 2e90e99b9482707c2a8826d0c03016da1531d453f7d992ca9311f23679c33aa3
5
+ SHA512:
6
+ metadata.gz: af1d5b921a5a2cce4979660f9542ea64a56a423bb604f91a6503b3423178e90f7b24d2fb4b530c90941bd5ee3413e05d81132f2dd83dccb810d472af85201d44
7
+ data.tar.gz: f2d9d4aa75de5ceb6a5170ce17f4c1ee82277bf7b782bdb3dbf1f9449370fec0822c4f4468ffd43d05e4fbf77cfc9d41fdb165b3dd1d517dfa2476f582a51a25
data/AUTHORS ADDED
@@ -0,0 +1,8 @@
1
+ # This is a list of people who have contributed code or ideas to ronn -- for
2
+ # copyright purposes or whatever.
3
+
4
+ Ryan Tomayko <https://github.com/rtomayko>
5
+ Chris Wanstrath <https://github.com/defunkt>
6
+ Suraj N. Kurapati <https://github.com/sunaku>
7
+ Hallison Batista <https://github.com/hallison>
8
+ Andrew Janke <https://github.com/apjanke>
data/CHANGES ADDED
@@ -0,0 +1,230 @@
1
+ Ronn-NG CHANGES
2
+ ===============
3
+
4
+ Version 0.10.1 (in progress)
5
+ ----------------------------
6
+
7
+ * Switch to GitHub Flavored Markdown, fixing code block rendering (<https://github.com/apjanke/ronn-ng/pull/53>)
8
+ * Revert `\[ci]` back to `\(bu)` (<https://github.com/apjanke/ronn-ng/pull/51>)
9
+ * Minor fix to single-quote escaping (<https://github.com/apjanke/ronn-ng/issues/55>)
10
+ * Elide HTML comments when producing roff output (<https://github.com/apjanke/ronn-ng/issues/65>)
11
+ * Bump to mustache 1.x
12
+ * Remove non-portable `more -i` option (<https://github.com/apjanke/ronn-ng/issues/71>)
13
+
14
+ Version 0.10.0 (never)
15
+ ---------------------------
16
+
17
+ Doesn't exist due to a RubyGems publishing mistake
18
+
19
+ Version 0.9.1 (2020 Apr 09)
20
+ ---------------------------
21
+
22
+ * Fix underlining issue (<https://github.com/apjanke/ronn-ng/pull/41>)
23
+
24
+ Version 0.9.0 (2019 Dec 21)
25
+ ---------------------------
26
+
27
+ * Migrate to kramdown for the underlying Markdown library
28
+ * Minor output formatting and documentation improvements
29
+
30
+ Version 0.8.2 (2019 Mar 5)
31
+ --------------------------
32
+
33
+ * Fixes packaging error in 0.8.1
34
+
35
+ Version 0.8.1 (2019 Mar 5)
36
+ --------------------------
37
+
38
+ * Fixed URL hyphenation bug. (<https://github.com/apjanke/ronn-ng/issues/23>) (apjanke)
39
+ * Fixed ordered-list bustication. (<https://github.com/apjanke/ronn-ng/issues/24>) (apjanke)
40
+
41
+ Version 0.8.0 (2018 Dec 25)
42
+ ---------------------------
43
+
44
+ * Added tables support. (apjanke)
45
+ * Lint & Rubocop fixes. (apjanke)
46
+ * Added --output-dir option. (apjanke)
47
+ * Support file names with periods in the name section. (apjanke)
48
+ * Migrated from Hpricot to Nokogiri. (apjanke)
49
+
50
+ Version 0.7.4 (2018 Dec 22)
51
+ ---------------------------
52
+
53
+ * Forked Ronn-NG from original Ronn. (apjanke)
54
+ * Minor bug fixes: #4, #5 (apjanke)
55
+
56
+ Original Ronn CHANGES
57
+ =====================
58
+
59
+ Version 0.7.3 (2010 June 24)
60
+ ----------------------------
61
+
62
+ * Fixed a major bug in roff output due to overly aggressive doublequote
63
+ escaping. Paragraphs and code blocks were not being displayed if they
64
+ included a double-quote character. (rtomayko, pawelz)
65
+
66
+ Version 0.7.0 (2010 June 21)
67
+ ----------------------------
68
+
69
+ * HTML: Manual references (like 'grep(1)', 'ls(1)', etc.) are now hyperlinked
70
+ based on a set of name -> URL mappings defined in an index.txt file. The index
71
+ may also define links to things that aren't manuals for use in markdown
72
+ reference-style links. See the ronn(1) manual on LINK INDEXES for more
73
+ inforation: <http://rtomayko.github.com/ronn/ronn.1.html#LINK-INDEXES>
74
+ (rtomayko)
75
+
76
+ * ROFF: Fixed a bug where multiple dot characters (.) at the beginning of a
77
+ line were not being escaped properly and were not displayed when viewed
78
+ in the terminal. (rtomayko)
79
+
80
+ * ROFF: Non-breaking space characters (&nbsp;) can now be used to control line
81
+ wrap in roff output. (rtomayko)
82
+
83
+ * ROFF: Named HTML entities like &bull;, &trade;, &copy;, and &mdash; are now
84
+ converted to their roff escaped equivalents. (rtomayko)
85
+
86
+ * An undocumented --markdown format option argument has been added to ronn(1).
87
+ When given, ronn generates a <name>.<section>.markdown file with the
88
+ post-processed markdown text. This is mostly useful for debugging but may be
89
+ useful for converting ronn-format to 100% compatible markdown text.
90
+ (rtomayko)
91
+
92
+ * The ronn(5) manpage is now known as ronn-format(7) (section 5 is limited
93
+ to configuration files and stuff like that historically). The old ronn(7)
94
+ manpage, which was really just the README, has been removed.
95
+ (rtomayko)
96
+
97
+ * Performance improvements. Fixed a few cases where HTML was being reparsed
98
+ needlessly, tuned dom selectors, ... (rtomayko)
99
+
100
+ Version 0.6.6 (2010 June 13)
101
+ ----------------------------
102
+
103
+ Small bug fix release fixes whitespace stripping between adjacent
104
+ inline elements in roff output (adamv, rtomayko)
105
+
106
+ Version 0.6 (2010 June 13)
107
+ --------------------------
108
+
109
+ Features:
110
+
111
+ * HTML: New styling system:
112
+ ronn --style=toc,print program.1.ronn
113
+ ronn -s dark,toc,/path/to/custom.css man/*.ronn
114
+
115
+ The --style (-s) option takes a list of CSS stylesheets to embed into the
116
+ generated HTML. Stylesheets are inserted in the order specified and can use
117
+ the cascade to add or remove visual elements.
118
+
119
+ Ronn ships with a few built in styles: toc, dark, 80c, and print. You can
120
+ insert your own by giving the path or manipulating the RONN_STYLE environment
121
+ variable.
122
+
123
+ See ronn(1) for full details on all of these things (rtomayko)
124
+
125
+ * HTML: It's now possible to generate a Table Of Contents of manpage sections.
126
+ The TOC is disabled by default. To enable it: ronn --style=toc file.ronn
127
+ (sunaku)
128
+
129
+ * HTML: The RONN_LAYOUT environment variable can be used to apply a custom
130
+ mustache layout template:
131
+
132
+ RONN_LAYOUT=mine.mustache ronn man/great-program.1.ronn
133
+
134
+ See lib/ronn/template/default.html for default markup and features
135
+ (defunkt)
136
+
137
+ * HTML: All heading elements include page anchor id attributes to make
138
+ it possible to link to a specific manpage section (sunaku)
139
+
140
+ * HTML: Markdown reference links can be used to refer to sections. To link
141
+ to the SEE ALSO section of the current manpage, use: [SEE ALSO][], or [to
142
+ control the link text][SEE ALSO], or even [use the relative URL](#SEE-ALSO).
143
+ (rtomayko)
144
+
145
+ * HTML: 80 character terminal style: ronn -s 80c file.ronn -- precisely
146
+ emulates a 80c terminal (sunaku)
147
+
148
+ * HTML: Various appearance changes to the default stylesheet: smaller type
149
+ with consistent vertical baseline; darker type for more contrast; em, var,
150
+ and u are italic instead of underline (rtomayko)
151
+
152
+ * HTML: Various print stylesheet tweaks, including hyperlinks and layout
153
+ enhancements (sunaku)
154
+
155
+ * ROFF: ronn --warnings (-w) shows troff warnings on stderr when building
156
+ or viewing manuals. (rtomayko)
157
+
158
+ * ROFF: Ordered lists. (sunaku)
159
+
160
+ * ROFF: URLs for hyperlinks are shown immediately after hyperlink text.
161
+ (sunaku)
162
+
163
+ * The RONN_MANUAL, RONN_ORGANIZATION, and RONN_DATE environment variables
164
+ establish the default values of the --manual, --organization, and --date
165
+ options (rtomayko)
166
+
167
+ Bugs:
168
+
169
+ * ROFF: Don't crash with empty preformatted blocks (sunaku)
170
+
171
+ * ROFF: A whole bunch of weird whitespace related problems in roff output,
172
+ such as the first line of definition lists being indented by two
173
+ characters (rtomayko)
174
+
175
+ * ROFF: All ['".] characters are backslash escaped in roff output. These
176
+ characters are used for various roff macro syntax (rtomayko)
177
+
178
+ Deprecations, Obsoletions:
179
+
180
+ * The ronn(1) command line interface has changed in ways that are not
181
+ backward-compatible with previous versions of ronn. The --build option is
182
+ assumed when one or more .ronn files is given on the command line. Previous
183
+ versions write generated content to standard output with no explicit --build
184
+ options.
185
+
186
+ The default behavior when no files are given remains the same as previous
187
+ versions: ronn source text is read from stdin and roff is written to stdout.
188
+
189
+ See `ronn --help' or the ronn(1) manual for more on command line interface
190
+ changes.
191
+
192
+ (rtomayko, defunkt)
193
+
194
+ * HTML: Ronn no longer uses a specific monospace font-family; the system
195
+ default monospace font is used instead. Use 'ronn --style' to set up a font
196
+ stack (rtomayko)
197
+
198
+ * HTML: The following HTML elements are deprecated and will be removed at some
199
+ point: div#man, div#man ol.man, div#man ol.head, div#man ol.man.
200
+
201
+ The .mp, .man-decor, .man-head, .man-foot, .man-title, and .man-navigation
202
+ classes should be used instead (rtomayko)
203
+
204
+ * The markdown(5) manpage is no longer shipped with the ronn package. It is
205
+ shipped with the latest version of rdiscount, however.
206
+ (rtomayko, sunaku)
207
+
208
+ 0.5 (2010 April 24)
209
+ -------------------
210
+
211
+ * Fixed a bug in roff output where multiple successive newlines were being
212
+ collapsed into a single newline in preformatted output.
213
+
214
+ * Hexadecimal and decimal entity references generated by the Markdown to HTML
215
+ conversion are now properly decoded into normal characters in roff output.
216
+
217
+ * The compatibility shims that allowed the ronn command to be invoked as "ron",
218
+ and the ronn library to be required as "ron", have been removed.
219
+
220
+
221
+ 0.4 (2010 March 08)
222
+ -------------------
223
+
224
+ * Ron has been renamed "Ronn", including the "ronn" command and the "ronn"
225
+ library. Compatibility shims are included in this release but will be removed
226
+ in the next release.
227
+
228
+ * The hpricot library is now used for HTML hackery instead of the nokogiri
229
+ library. The hpricot library is preferred because it doesn't depend on external
230
+ system dependencies.
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source 'https://rubygems.org'
2
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,72 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ nronn (0.10.1.pre2)
5
+ kramdown (~> 2.1)
6
+ kramdown-parser-gfm (~> 1.0.1)
7
+ mustache (~> 1.0)
8
+ nokogiri (~> 1.11, >= 1.11.0)
9
+
10
+ GEM
11
+ remote: https://rubygems.org/
12
+ specs:
13
+ ast (2.4.1)
14
+ kramdown (2.4.0)
15
+ rexml
16
+ kramdown-parser-gfm (1.0.1)
17
+ kramdown (~> 2.0)
18
+ mini_portile2 (2.8.0)
19
+ mustache (1.1.1)
20
+ mustermann (1.1.1)
21
+ ruby2_keywords (~> 0.0.1)
22
+ nokogiri (1.13.8)
23
+ mini_portile2 (~> 2.8.0)
24
+ racc (~> 1.4)
25
+ parallel (1.20.1)
26
+ parser (2.7.2.0)
27
+ ast (~> 2.4.1)
28
+ power_assert (1.2.0)
29
+ racc (1.6.0)
30
+ rack (2.2.3)
31
+ rack-protection (2.1.0)
32
+ rack
33
+ rainbow (3.0.0)
34
+ rake (12.3.3)
35
+ regexp_parser (2.0.1)
36
+ rexml (3.2.5)
37
+ rubocop (0.93.1)
38
+ parallel (~> 1.10)
39
+ parser (>= 2.7.1.5)
40
+ rainbow (>= 2.2.2, < 4.0)
41
+ regexp_parser (>= 1.8)
42
+ rexml
43
+ rubocop-ast (>= 0.6.0)
44
+ ruby-progressbar (~> 1.7)
45
+ unicode-display_width (>= 1.4.0, < 2.0)
46
+ rubocop-ast (1.3.0)
47
+ parser (>= 2.7.1.5)
48
+ ruby-progressbar (1.10.1)
49
+ ruby2_keywords (0.0.2)
50
+ sinatra (2.1.0)
51
+ mustermann (~> 1.0)
52
+ rack (~> 2.2)
53
+ rack-protection (= 2.1.0)
54
+ tilt (~> 2.0)
55
+ test-unit (3.3.7)
56
+ power_assert
57
+ tilt (2.0.10)
58
+ unicode-display_width (1.7.0)
59
+
60
+ PLATFORMS
61
+ ruby
62
+
63
+ DEPENDENCIES
64
+ nronn!
65
+ rack (~> 2.2, >= 2.2.3)
66
+ rake (~> 12.3, >= 12.3.3)
67
+ rubocop (~> 0.88, >= 0.88.0)
68
+ sinatra (~> 2.0, >= 2.0.8)
69
+ test-unit (~> 3.3, >= 3.3.6)
70
+
71
+ BUNDLED WITH
72
+ 2.1.4
data/INSTALLING.md ADDED
@@ -0,0 +1,92 @@
1
+ nRonn Installation
2
+ ====================
3
+
4
+ ## Installation Process
5
+
6
+ ### From a Package Manager
7
+
8
+ TBD
9
+ ### From RubyGems
10
+
11
+ nRonn is distributed as a gem package, which can be used if you don't have
12
+ a supported package manager. Install with rubygems:
13
+
14
+ ```
15
+ gem install nronn
16
+ ronn --help
17
+ ```
18
+
19
+ nRonn includes completion definitions for bash and zsh, but these are not
20
+ installed into the system locations as part of the gem. You will need to figure
21
+ out how to install those into your system to make them available in your shell.
22
+
23
+ A decent way to do this is probably to add symlinks to your system shell
24
+ completion directories pointing at the files in the installed gem.
25
+
26
+ In Zsh, you can do something like this:
27
+
28
+ ```
29
+ ronn_dist_dir=$(dirname $(dirname $(gem which nronn)))
30
+ ronn_zsh_dir="$ronn_dist_dir/completion/zsh"
31
+ ln -s "$ronn_zsh_dir/_ronn" /usr/local/share/zsh/site-functions
32
+ ```
33
+
34
+ In Bash, something like this:
35
+
36
+ ```
37
+ ronn_dist_dir=$(dirname $(dirname $(gem which nronn)))
38
+ ronn_bash_dir="$ronn_dist_dir/completion/bash"
39
+ ln -s "$ronn_bash_dir/ronn" /usr/local/etc/bash_completion.d
40
+ ```
41
+
42
+ You will need to redo these steps each time you upgrade `nronn` or install
43
+ it into a different Ruby environment. Sorry for the inconvenience; this seems
44
+ to be a limitation of the `gem` installation mechanism.
45
+
46
+ If that `gem which` stuff doesn't work for you, you can `gem install gem-path`
47
+ and use `gem path nronn` instead.
48
+
49
+
50
+ ## Building from Source
51
+
52
+ Hacking? Install nRonn from source.
53
+
54
+ Clone the git repository and put ronn/bin on your PATH:
55
+
56
+ ```
57
+ git clone git://github.com/apjanke/nronn
58
+ PATH=$(pwd)/nronn/bin:$PATH
59
+ ```
60
+
61
+ The following gems are required for nronn development:
62
+ * nokogiri
63
+ * mustache
64
+ * kramdown
65
+ * rubocop
66
+ * sinatra
67
+ * rack
68
+ * rake
69
+ * test-unit
70
+
71
+ ```
72
+ gem install nokogiri mustache kramdown rubocop sinatra rack rake test-unit
73
+ ```
74
+
75
+ Or install them with bundler using the project's gem definition:
76
+
77
+ ```
78
+ bundle install --with development
79
+ ```
80
+
81
+ Then you should be able to make changes directly to your cloned repo and have
82
+ them be reflected in your active `ronn` command.
83
+
84
+ ## Legacy Versions
85
+
86
+ Historical Ronn tarballs available at [the original Ronn repo](https://github.com/n-ronn/nronn/tags).
87
+
88
+ ```
89
+ curl -L https://github.com/n-ronn/nronn/archive/refs/tags/0.6.6.tar.gz | tar xvzf -
90
+ cd rtomayko-r*
91
+ ruby setup.rb
92
+ ```
data/LICENSE.txt ADDED
@@ -0,0 +1,12 @@
1
+ The MIT License
2
+
3
+ Copyright (C) 2009 Ryan Tomayko <tomayko.com/about>
4
+ Copyright (C) 2018, 2019 Andrew Janke <apjanke.net>
5
+ Copyright (C) 2022 Takuya Noguchi <takninnovationresearch@gmail.com>
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
8
+
9
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
10
+
11
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
12
+
data/README.md ADDED
@@ -0,0 +1,131 @@
1
+ # nRonn
2
+
3
+ nRonn is a new, currently-maintained fork of the defunct [original Ronn
4
+ project](https://github.com/rtomayko/ronn).
5
+
6
+ Ronn builds manuals. It converts simple, human readable textfiles to roff for
7
+ terminal display, and also to HTML for the web.
8
+
9
+ The source format includes all of Markdown but has a more rigid structure and
10
+ syntax extensions for features commonly found in manpages (definition lists,
11
+ link notation, etc.). The ronn-format(7) manual page defines the format in
12
+ detail.
13
+
14
+ The `*.ronn` files found in the [`man/`][1] directory show off a wide range of
15
+ ronn capabilities:
16
+
17
+ * [ronn(1)](http://rtomayko.github.com/ronn/ronn.1) command -
18
+ [source file](https://github.com/n-ronn/nronn/blob/master/man/ronn.1.ronn),
19
+ [roff output](https://github.com/n-ronn/nronn/blob/master/man/ronn.1)
20
+
21
+ * [ronn-format(7)](http://rtomayko.github.com/ronn/ronn-format.7) -
22
+ [source file](https://github.com/n-ronn/nronn/blob/master/man/ronn-format.7.ronn),
23
+ [roff output](https://github.com/n-ronn/nronn/blob/master/man/ronn-format.7)
24
+
25
+ [1]: https://github.com/n-ronn/nronn/tree/master/man
26
+
27
+ As an alternative, you might want to check out [pandoc](http://johnmacfarlane.net/pandoc/) which can also convert markdown into roff manual pages.
28
+
29
+ ## Installation
30
+
31
+ Install with `gem` anywhere that supports it:
32
+
33
+ ```bash
34
+ gem install nronn
35
+ ```
36
+
37
+ See [INSTALLING.md](INSTALLING.md) for details on other systems and installation methods.
38
+
39
+ ## Examples
40
+
41
+ Build roff and HTML output files for one or more input files:
42
+
43
+ ```bash
44
+ $ ronn man/ronn.5.ronn
45
+ roff: man/ronn.5
46
+ html: man/ronn.5.html
47
+ ```
48
+
49
+ Generate only a standalone HTML version of one or more files:
50
+
51
+ ```bash
52
+ $ ronn --html man/markdown.5.ronn
53
+ html: man/markdown.5.html
54
+ ```
55
+
56
+ Build roff versions of all ronn files in a directory:
57
+
58
+ ```bash
59
+ $ ronn --roff man/*.ronn
60
+ ```
61
+
62
+ View a ronn file as if it were a manpage without building intermediate files:
63
+
64
+ ```bash
65
+ $ ronn --man man/markdown.5.ronn
66
+ ```
67
+
68
+ View roff output with man(1):
69
+
70
+ ```bash
71
+ $ man man/ronn.5
72
+ ```
73
+
74
+ The [ronn(1)](http://rtomayko.github.com/ronn/ronn.1) manual page includes
75
+ comprehensive documentation on `ronn` command line options.
76
+
77
+ ## Background
78
+
79
+ Some think Unix manual pages are a poor and outdated form of documentation. nRonn
80
+ disagrees:
81
+
82
+ * Manpages follow a well defined structure that's immediately familiar. This
83
+ gives developers a starting point when documenting new tools, libraries, and
84
+ formats.
85
+
86
+ * Manpages get to the point. Because they're written in an inverted style, with
87
+ a SYNOPSIS section followed by additional detail, prose and references to
88
+ other sources of information, manpages provide the best of both cheat sheet
89
+ and reference style documentation.
90
+
91
+ * Historically, manpages use an extremely — unbelievably — limited set of
92
+ text formatting capabilities. You get a couple of headings, lists, bold,
93
+ underline and no more. This is a feature.
94
+
95
+ * Although two levels of section hierarchy are technically supported, most
96
+ manpages use only a single level. Unwieldy document hierarchies complicate
97
+ otherwise good documentation. Remember that Feynman covered all of physics
98
+ — heavenly bodies through QED — with only two levels of document hierarchy
99
+ (_The Feynman Lectures on Physics_, 1970).
100
+
101
+ * The classical terminal manpage display is typographically well thought out.
102
+ Big bold section headings, justified monospace text, nicely indented
103
+ paragraphs, intelligently aligned definition lists, and an informational
104
+ header and footer.
105
+
106
+ * Manpages have a simple referencing syntax; e.g., sh(1), fork(2), markdown(7).
107
+ HTML versions can use this to generate links between pages.
108
+
109
+ Unfortunately, figuring out how to create a manpage is a fairly tedious process.
110
+ The roff/mandoc/mdoc macro languages are highly extensible, fractured between
111
+ multiple dialects, and include a bunch of device-specific stuff irrelevant to
112
+ modern publishing tools. Ronn aims to solve that problem.
113
+
114
+ ## Requirements
115
+
116
+ Ruby 2.3 or newer, and gems as listed in `nronn.gemspec`.
117
+
118
+ ## Project Management
119
+
120
+ The project home page is at <https://github.com/n-ronn/nronn>. Bug reports,
121
+ feature requests, and patch submissions are welcome.
122
+
123
+ ## License and Copying
124
+
125
+ MIT License.
126
+
127
+ See [LICENSE.txt](LICENSE.txt) for detail.
128
+
129
+ ## Build Status
130
+
131
+ TODO