ronn 0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,152 @@
1
+ ronn(5) -- humane manual page authoring format
2
+ ==============================================
3
+
4
+ ## SYNOPSIS
5
+
6
+ name(1) -- one sentence description
7
+ ===================================
8
+
9
+ ## SECTION HEADING
10
+
11
+ A normal paragraph. This can span multiple lines and is
12
+ terminated with two or more line endings -- just like
13
+ Markdown.
14
+
15
+ ## INLINE MARKUP
16
+
17
+ Inline markup is used for `code` and `user input` (displayed
18
+ in boldface), and also <variables> or _emphasis_.
19
+
20
+ Manual page references like sh(1), markdown(5), roff(7), etc.
21
+ are displayed in boldface and hyperlinked in HTML output.
22
+
23
+ ## DEFINITION LISTS
24
+
25
+ Definition lists are used to define options, arguments,
26
+ variables, and other type of terms:
27
+
28
+ * `-a`, `--arg1`=[_OPTION_]:
29
+ One or more paragraphs describing the argument.
30
+ * `-b`, `--arg2`:
31
+ Any number of these may be specified and may
32
+ be nested.
33
+
34
+ ## DESCRIPTION
35
+
36
+ Ronn files are simple ascii texts that document things in the
37
+ style of UNIX man pages but with a syntax and feature-set less
38
+ insane than that of roff(7). Ronn files are piped through ronn(1)
39
+ to build and install traditional roff(7) man pages or to generate
40
+ hyperlinked HTML documentation.
41
+
42
+ All ronn formatted files must conform to a simple subset of
43
+ markdown(5), a humane text markup designed for writing on the
44
+ web. It is neither possible nor desirable to express many of
45
+ roff(7)'s complex typesetting features in ronn.
46
+
47
+ ## MANPAGE TITLE
48
+
49
+ All man pages have a <name>, belong to a <section>, and have a
50
+ single sentence <tagline> (useless but witty, preferably). Ronn
51
+ files must begin with a first-level heading that includes all of
52
+ this information. For example, this very man page begins:
53
+
54
+ ronn(5) -- humane manual page authoring format
55
+ =============================================
56
+
57
+ Here, we're saying that the man page documents a thing named
58
+ `ronn` in manual section `5` (the "file formats" section; see
59
+ manpages(5) for full section list) and that's quickly described
60
+ as a "humane manual page authoring format".
61
+
62
+ These bits of information are used to fill in the document
63
+ header, to create the `NAME` section, and also to establish
64
+ output filenames when processed with ronn(1).
65
+
66
+ ## SECTION HEADINGS
67
+
68
+ Man section headings are expressed with markdown level two
69
+ headings. markdown(5) provides two syntaxes for level two
70
+ headings. A hash prefix syntax:
71
+
72
+ ## HEADING TEXT
73
+
74
+ Or, a dash underline syntax:
75
+
76
+ HEADING TEXT
77
+ ------------
78
+
79
+ Section headings should be in all uppercase and may not contain
80
+ other inline markup.
81
+
82
+ Most manual pages include at least one of the `SYNOPSIS`,
83
+ `DESCRIPTION`, and/or `OPTIONS` sections. Additional sections
84
+ commonly included are `SYNTAX`, `ENVIRONMENT`, `HISTORY`, `RETURN
85
+ VALUES`, `BUGS`, `SECURITY CONSIDERATIONS`, `STANDARDS` /
86
+ `CONFORMING TO`, `AUTHOR`, and `COPYRIGHT`. Finally, most man
87
+ pages end with a `SEE ALSO` section that references other manual
88
+ pages and external documents.
89
+
90
+ ## INLINE MARKUP
91
+
92
+ Man pages have a limited set of text formatting capabilities at
93
+ their disposal. There's basically <b>boldface</b> and
94
+ <i>italics</i> (often displayed using <u>underline</u>). Ronn uses
95
+ the following bits of markdown(5) to accomplish this:
96
+
97
+ * <code>\`backticks\`</code>:
98
+ Code, flags, commands, and noun-like things; typically
99
+ displayed in in <b>boldface</b>. Note that all text included
100
+ within `backticks` is displayed literally; other inline markup
101
+ is not processed.
102
+ * `**double-stars**`:
103
+ Like `backticks` but inline markup is processed.
104
+ * `_`_underbars_`_`:
105
+ User-specified arguments, variables, or user input; typically
106
+ displayed with <u>underline</u>.
107
+ * `<angle-quotes>`:
108
+ Same as _underbars_. This is not compatible with Markdown.
109
+
110
+ Here is grep(1)'s DESCRIPTION section represented in `ronn`:
111
+
112
+ `Grep` searches the named input _FILE_ (or standard input if
113
+ no files are named, or the file name `-` is given) for lines
114
+ containing a match to the given _PATTERN_. By default, `grep`
115
+ prints the matching lines.
116
+
117
+ ## DEFINITION LISTS
118
+
119
+ Because definition lists are so often used in manual pages to
120
+ describe arguments, options, and variables, the basic markdown(5)
121
+ list syntax has been extended to support a definition list
122
+ syntax.
123
+
124
+ Definition list syntax is exactly the same as markdown(5)'s
125
+ unordered list syntax but requires that the first line of each
126
+ list item be terminated with a colon "`:`". The first line (minus
127
+ the colon) is the <term>; subsequent lines may be comprised of
128
+ multiple paragraphs, code blocks, standard lists, and nested
129
+ definition lists.
130
+
131
+ An example definition list, taken from BSD test(1)'s
132
+ `DESCRIPTION` section:
133
+
134
+ The following primaries are used to construct expressions:
135
+
136
+ * `-b` _file_:
137
+ True if _file_ exists and is a block special file.
138
+
139
+ * `-c` _file_:
140
+ True if _file_ exists and is a character special file.
141
+
142
+ * `-d` _file_:
143
+ True if file exists and is a directory.
144
+
145
+ The definition list syntax is intentionally backward compatible
146
+ with markdown(5)'s list syntax. This allows `ronn` documents to be
147
+ piped through normal markdown processors with minor degradation
148
+ in output formatting.
149
+
150
+ ## SEE ALSO
151
+
152
+ ronn(1), markdown(5), manpages(5)
@@ -0,0 +1,195 @@
1
+ .\" generated with Ronn/v0.3
2
+ .\" http://github.com/rtomayko/ronn/
3
+ .
4
+ .TH "RONN" "7" "March 2010" "Ryan Tomayko" "Ronn Manual"
5
+ .
6
+ .SH "NAME"
7
+ \fBronn\fR \-\- the opposite of roff
8
+ .
9
+ .SH "DESCRIPTION"
10
+ Ronn is a humane text format and toolchain for creating UNIX man
11
+ pages, and things that appear as man pages from a distance. Use it
12
+ to build and install standard UNIX roff man pages or to generate
13
+ nicely formatted HTML manual pages for the web.
14
+ .
15
+ .P
16
+ The Ronn file format is based on Markdown. In fact, Ronn files are a
17
+ compatible subset of Markdown syntax but have a more rigid structure and
18
+ extend Markdown in some ways to provide features commonly found in man
19
+ pages (e.g., definition lists). The ronn(5) manual page defines the
20
+ format in more detail.
21
+ .
22
+ .SH "DOCUMENTATION"
23
+ The \fB.ronn\fR files located under the \fBman/\fR directory show off a wide
24
+ range of ronn capabilities and are the source of Ronn's own documentation.
25
+ The source files and generated HTML / roff output files are available
26
+ at:
27
+ .
28
+ .IP "\(bu" 4
29
+ \fIronn(1)\fR \-
30
+ build markdown based manual pages at the command line.
31
+ .
32
+ .br
33
+ \fIsource file\fR, \fIroff output\fR
34
+ .
35
+ .IP "\(bu" 4
36
+ \fIronn(5)\fR \-
37
+ humane manual page authoring format syntax reference.
38
+ .
39
+ .br
40
+ \fIsource file\fR, \fIroff output\fR
41
+ .
42
+ .IP "\(bu" 4
43
+ \fImarkdown(5)\fR \-
44
+ humane text markup syntax (taken from \fIMarkdown Syntax\fR,
45
+ John Gruber)
46
+ .
47
+ .br
48
+ \fIsource file\fR, \fIroff output\fR
49
+ .
50
+ .IP "" 0
51
+ .
52
+ .SH "INSTALL"
53
+ Install with Rubygems:
54
+ .
55
+ .IP "" 4
56
+ .
57
+ .nf
58
+ $ [sudo] gem install ronn
59
+ $ ronn \-\-help
60
+ .
61
+ .fi
62
+ .
63
+ .IP "" 0
64
+ .
65
+ .P
66
+ Or, clone the git repository:
67
+ .
68
+ .IP "" 4
69
+ .
70
+ .nf
71
+ $ git clone git://github.com/rtomayko/ronn.git
72
+ $ PATH=ronn/bin:$PATH
73
+ $ ronn \-\-help
74
+ .
75
+ .fi
76
+ .
77
+ .IP "" 0
78
+ .
79
+ .SH "BASIC USAGE"
80
+ To generate a roff man page from the included\fI\fBmarkdown.5.ronn\fR\fR file and open it with man(1):
81
+ .
82
+ .IP "" 4
83
+ .
84
+ .nf
85
+ $ ronn \-b man/markdown.5.ronn
86
+ building: man/markdown.5
87
+ $ man man/markdown.5
88
+ .
89
+ .fi
90
+ .
91
+ .IP "" 0
92
+ .
93
+ .P
94
+ To generate a standalone HTML version:
95
+ .
96
+ .IP "" 4
97
+ .
98
+ .nf
99
+ $ ronn \-b \-\-html man/markdown.5.ronn
100
+ building: man/markdown.5.html
101
+ $ open man/markdown.5.html
102
+ .
103
+ .fi
104
+ .
105
+ .IP "" 0
106
+ .
107
+ .P
108
+ To build roff and HTML versions of all ronn files:
109
+ .
110
+ .IP "" 4
111
+ .
112
+ .nf
113
+ $ ronn \-b \-\-roff \-\-html man/*.ronn
114
+ .
115
+ .fi
116
+ .
117
+ .IP "" 0
118
+ .
119
+ .P
120
+ If you just want to view a ronn file as if it were a man page without
121
+ building intermediate files:
122
+ .
123
+ .IP "" 4
124
+ .
125
+ .nf
126
+ $ ronn \-m man/markdown.5.ronn
127
+ .
128
+ .fi
129
+ .
130
+ .IP "" 0
131
+ .
132
+ .P
133
+ The \fIronn(1)\fR manual page
134
+ includes comprehensive documentation on \fBronn\fR command line options.
135
+ .
136
+ .SH "ABOUT"
137
+ Some people think UNIX manual pages are a poor and outdated style of
138
+ documentation. I disagree:
139
+ .
140
+ .IP "\(bu" 4
141
+ Man pages follow a well defined structure that's immediately
142
+ familiar and provides a useful starting point for developers
143
+ documenting new tools, libraries, and formats.
144
+ .
145
+ .IP "\(bu" 4
146
+ Man pages get to the point. Because they're written in an inverted
147
+ style, with a SYNOPSIS section followed by additional detail,
148
+ prose and references to other sources of information, man pages
149
+ provide the best of both cheat sheet and reference style
150
+ documentation.
151
+ .
152
+ .IP "\(bu" 4
153
+ Man pages have extremely \-\- unbelievably \-\- limited text
154
+ formatting capabilities. You get a couple of headings, lists, bold,
155
+ underline and no more. This is a feature.
156
+ .
157
+ .IP "\(bu" 4
158
+ Although two levels of section hierarchy are technically
159
+ supported, most man pages use only a single level. Unwieldy
160
+ document hierarchies complicate otherwise good documentation.
161
+ Feynman covered all of physics \-\- heavenly bodies through QED \-\-
162
+ with only two levels of document hierarchy (\fIThe Feynman Lectures
163
+ on Physics\fR, 1970).
164
+ .
165
+ .IP "\(bu" 4
166
+ Man pages have a simple referencing syntax; e.g., sh(1), fork(2),
167
+ markdown(5). HTML versions can use this to generate links between
168
+ pages.
169
+ .
170
+ .IP "\(bu" 4
171
+ The classical terminal man page display is typographically well
172
+ thought out. Big bold section headings, justified monospace text,
173
+ nicely indented paragraphs, intelligently aligned definition
174
+ lists, and an informational header and footer.
175
+ .
176
+ .IP "" 0
177
+ .
178
+ .P
179
+ Unfortunately, trying to figure out how to create a man page is a
180
+ fairly tedious process. The roff/man macro languages are highly
181
+ extensible, fractured between multiple dialects, and include a bunch
182
+ of device specific stuff that's entirely irrelevant to modern
183
+ publishing tools.
184
+ .
185
+ .P
186
+ Ronn aims to address many of the issues with man page creation while
187
+ preserving the things that makes man pages a great form of
188
+ documentation.
189
+ .
190
+ .SH "COPYING"
191
+ Ronn is Copyright (C) 2009 \fIRyan Tomayko\fR
192
+ See the file COPYING for information of licensing and distribution.
193
+ .
194
+ .SH "SEE ALSO"
195
+ \fIronn(1)\fR, \fIronn(5)\fR, \fImarkdown(5)\fR
@@ -0,0 +1,135 @@
1
+ ronn -- the opposite of roff
2
+ ===========================
3
+
4
+ ## DESCRIPTION
5
+
6
+ Ronn is a humane text format and toolchain for creating UNIX man
7
+ pages, and things that appear as man pages from a distance. Use it
8
+ to build and install standard UNIX roff man pages or to generate
9
+ nicely formatted HTML manual pages for the web.
10
+
11
+ The Ronn file format is based on Markdown. In fact, Ronn files are a
12
+ compatible subset of Markdown syntax but have a more rigid structure and
13
+ extend Markdown in some ways to provide features commonly found in man
14
+ pages (e.g., definition lists). The ronn(5) manual page defines the
15
+ format in more detail.
16
+
17
+ ## DOCUMENTATION
18
+
19
+ The `.ronn` files located under the `man/` directory show off a wide
20
+ range of ronn capabilities and are the source of Ronn's own documentation.
21
+ The source files and generated HTML / roff output files are available
22
+ at:
23
+
24
+ * [ronn(1)](http://rtomayko.github.com/ronn/ronn.1.html) -
25
+ build markdown based manual pages at the command line.
26
+ [source file](http://github.com/rtomayko/ronn/blob/master/man/ronn.1.ronn),
27
+ [roff output](http://github.com/rtomayko/ronn/blob/master/man/ronn.1)
28
+
29
+ * [ronn(5)](http://rtomayko.github.com/ronn/ronn.5.html) -
30
+ humane manual page authoring format syntax reference.
31
+ [source file](http://github.com/rtomayko/ronn/blob/master/man/ronn.5.ronn),
32
+ [roff output](http://github.com/rtomayko/ronn/blob/master/man/ronn.5)
33
+
34
+ * [markdown(5)](http://rtomayko.github.com/ronn/markdown.5.html) -
35
+ humane text markup syntax (taken from
36
+ [Markdown Syntax](http://daringfireball.net/projects/markdown/syntax),
37
+ John Gruber)
38
+ [source file](http://github.com/rtomayko/ronn/blob/master/man/markdown.5.ronn),
39
+ [roff output](http://github.com/rtomayko/ronn/blob/master/man/markdown.5)
40
+
41
+ ## INSTALL
42
+
43
+ Install with Rubygems:
44
+
45
+ $ [sudo] gem install ronn
46
+ $ ronn --help
47
+
48
+ Or, clone the git repository:
49
+
50
+ $ git clone git://github.com/rtomayko/ronn.git
51
+ $ PATH=ronn/bin:$PATH
52
+ $ ronn --help
53
+
54
+ ## BASIC USAGE
55
+
56
+ To generate a roff man page from the included
57
+ [`markdown.5.ronn`](man/markdown.5.ronn) file and open it with man(1):
58
+
59
+ $ ronn -b man/markdown.5.ronn
60
+ building: man/markdown.5
61
+ $ man man/markdown.5
62
+
63
+ To generate a standalone HTML version:
64
+
65
+ $ ronn -b --html man/markdown.5.ronn
66
+ building: man/markdown.5.html
67
+ $ open man/markdown.5.html
68
+
69
+ To build roff and HTML versions of all ronn files:
70
+
71
+ $ ronn -b --roff --html man/*.ronn
72
+
73
+ If you just want to view a ronn file as if it were a man page without
74
+ building intermediate files:
75
+
76
+ $ ronn -m man/markdown.5.ronn
77
+
78
+ The [ronn(1)](http://rtomayko.github.com/ronn/ronn.1.html) manual page
79
+ includes comprehensive documentation on `ronn` command line options.
80
+
81
+ ## ABOUT
82
+
83
+ Some people think UNIX manual pages are a poor and outdated style of
84
+ documentation. I disagree:
85
+
86
+ - Man pages follow a well defined structure that's immediately
87
+ familiar and provides a useful starting point for developers
88
+ documenting new tools, libraries, and formats.
89
+
90
+ - Man pages get to the point. Because they're written in an inverted
91
+ style, with a SYNOPSIS section followed by additional detail,
92
+ prose and references to other sources of information, man pages
93
+ provide the best of both cheat sheet and reference style
94
+ documentation.
95
+
96
+ - Man pages have extremely -- unbelievably -- limited text
97
+ formatting capabilities. You get a couple of headings, lists, bold,
98
+ underline and no more. This is a feature.
99
+
100
+ - Although two levels of section hierarchy are technically
101
+ supported, most man pages use only a single level. Unwieldy
102
+ document hierarchies complicate otherwise good documentation.
103
+ Feynman covered all of physics -- heavenly bodies through QED --
104
+ with only two levels of document hierarchy (_The Feynman Lectures
105
+ on Physics_, 1970).
106
+
107
+ - Man pages have a simple referencing syntax; e.g., sh(1), fork(2),
108
+ markdown(5). HTML versions can use this to generate links between
109
+ pages.
110
+
111
+ - The classical terminal man page display is typographically well
112
+ thought out. Big bold section headings, justified monospace text,
113
+ nicely indented paragraphs, intelligently aligned definition
114
+ lists, and an informational header and footer.
115
+
116
+ Unfortunately, trying to figure out how to create a man page is a
117
+ fairly tedious process. The roff/man macro languages are highly
118
+ extensible, fractured between multiple dialects, and include a bunch
119
+ of device specific stuff that's entirely irrelevant to modern
120
+ publishing tools.
121
+
122
+ Ronn aims to address many of the issues with man page creation while
123
+ preserving the things that makes man pages a great form of
124
+ documentation.
125
+
126
+ ## COPYING
127
+
128
+ Ronn is Copyright (C) 2009 [Ryan Tomayko](http://tomayko.com/about)
129
+ See the file COPYING for information of licensing and distribution.
130
+
131
+ ## SEE ALSO
132
+
133
+ [ronn(1)](http://rtomayko.github.com/ronn/ronn.1.html),
134
+ [ronn(5)](http://rtomayko.github.com/ronn/ronn.5.html),
135
+ [markdown(5)](http://rtomayko.github.com/ronn/markdown.5.html)