nronn 0.10.1.pre2
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 +7 -0
- data/AUTHORS +8 -0
- data/CHANGES +230 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +72 -0
- data/INSTALLING.md +92 -0
- data/LICENSE.txt +12 -0
- data/README.md +131 -0
- data/Rakefile +153 -0
- data/bin/ronn +253 -0
- data/completion/bash/ronn +32 -0
- data/completion/zsh/_ronn +24 -0
- data/config.ru +15 -0
- data/lib/ronn/document.rb +530 -0
- data/lib/ronn/index.rb +180 -0
- data/lib/ronn/roff.rb +393 -0
- data/lib/ronn/server.rb +67 -0
- data/lib/ronn/template/80c.css +6 -0
- data/lib/ronn/template/dark.css +18 -0
- data/lib/ronn/template/darktoc.css +17 -0
- data/lib/ronn/template/default.html +41 -0
- data/lib/ronn/template/man.css +100 -0
- data/lib/ronn/template/print.css +5 -0
- data/lib/ronn/template/screen.css +105 -0
- data/lib/ronn/template/toc.css +27 -0
- data/lib/ronn/template.rb +173 -0
- data/lib/ronn/utils.rb +57 -0
- data/lib/ronn.rb +47 -0
- data/man/index.html +78 -0
- data/man/index.txt +15 -0
- data/man/ronn-format.7 +145 -0
- data/man/ronn-format.7.ronn +157 -0
- data/man/ronn.1 +227 -0
- data/man/ronn.1.ronn +316 -0
- data/nronn.gemspec +136 -0
- data/test/angle_bracket_syntax.html +27 -0
- data/test/angle_bracket_syntax.roff +24 -0
- data/test/angle_bracket_syntax.ronn +22 -0
- data/test/backticks.html +14 -0
- data/test/backticks.ronn +10 -0
- data/test/basic_document.html +8 -0
- data/test/basic_document.ronn +4 -0
- data/test/circumflexes.ronn +1 -0
- data/test/code_blocks.html +38 -0
- data/test/code_blocks.roff +38 -0
- data/test/code_blocks.ronn +41 -0
- data/test/code_blocks_regression +19 -0
- data/test/code_blocks_regression.html +38 -0
- data/test/code_blocks_regression.ronn +40 -0
- data/test/contest.rb +70 -0
- data/test/custom_title_document.html +6 -0
- data/test/custom_title_document.ronn +5 -0
- data/test/definition_list_syntax.html +25 -0
- data/test/definition_list_syntax.roff +19 -0
- data/test/definition_list_syntax.ronn +18 -0
- data/test/dots_at_line_start_test.roff +19 -0
- data/test/dots_at_line_start_test.ronn +12 -0
- data/test/ellipses.roff +7 -0
- data/test/ellipses.ronn +7 -0
- data/test/entity_encoding_test.html +42 -0
- data/test/entity_encoding_test.roff +51 -0
- data/test/entity_encoding_test.ronn +34 -0
- data/test/index.txt +8 -0
- data/test/markdown_syntax.html +954 -0
- data/test/markdown_syntax.roff +907 -0
- data/test/markdown_syntax.ronn +881 -0
- data/test/middle_paragraph.html +14 -0
- data/test/middle_paragraph.roff +9 -0
- data/test/middle_paragraph.ronn +10 -0
- data/test/missing_spaces.roff +7 -0
- data/test/missing_spaces.ronn +2 -0
- data/test/nested_list.ronn +19 -0
- data/test/nested_list_with_code.html +14 -0
- data/test/nested_list_with_code.roff +11 -0
- data/test/nested_list_with_code.ronn +6 -0
- data/test/ordered_list.html +28 -0
- data/test/ordered_list.roff +25 -0
- data/test/ordered_list.ronn +21 -0
- data/test/page.with.periods.in.name.5.ronn +4 -0
- data/test/pre_block_with_quotes.roff +8 -0
- data/test/pre_block_with_quotes.ronn +6 -0
- data/test/section_reference_links.html +16 -0
- data/test/section_reference_links.roff +7 -0
- data/test/section_reference_links.ronn +12 -0
- data/test/single_quotes.html +11 -0
- data/test/single_quotes.roff +5 -0
- data/test/single_quotes.ronn +9 -0
- data/test/tables.ronn +24 -0
- data/test/test_ronn.rb +124 -0
- data/test/test_ronn_document.rb +186 -0
- data/test/test_ronn_index.rb +73 -0
- data/test/titleless_document.html +9 -0
- data/test/titleless_document.ronn +3 -0
- data/test/underline_spacing_test.roff +13 -0
- data/test/underline_spacing_test.ronn +11 -0
- metadata +309 -0
@@ -0,0 +1,105 @@
|
|
1
|
+
/* STRUCTURE, INDENT, MARGINS */
|
2
|
+
|
3
|
+
body { margin:0 }
|
4
|
+
#man { max-width:88ex; padding:0 2ex 1ex 2ex }
|
5
|
+
|
6
|
+
#man p, #man pre,
|
7
|
+
#man ul, #man ol, #man dl { margin:0 0 20px 0 }
|
8
|
+
#man h2 { margin:10px 0 0 0 }
|
9
|
+
|
10
|
+
#man > p, #man > pre,
|
11
|
+
#man > ul, #man > ol, #man > dl { margin-left:8ex }
|
12
|
+
#man h3 { margin:0 0 0 4ex }
|
13
|
+
|
14
|
+
#man dt { margin:0; clear:left }
|
15
|
+
#man dt.flush { float:left; width:8ex }
|
16
|
+
#man dd { margin:0 0 0 9ex }
|
17
|
+
#man h1, #man h2, #man h3, #man h4 { clear:left }
|
18
|
+
|
19
|
+
#man pre { margin-bottom:20px }
|
20
|
+
#man pre+h2, #man pre+h3 { margin-top:22px }
|
21
|
+
#man h2+pre, #man h3+pre { margin-top:5px }
|
22
|
+
|
23
|
+
#man img { display:block;margin:auto }
|
24
|
+
#man h1.man-title { display:none }
|
25
|
+
|
26
|
+
/* FONTS */
|
27
|
+
|
28
|
+
#man, #man code, #man pre,
|
29
|
+
#man tt, #man kbd, #man samp,
|
30
|
+
#man h3, #man h4 {
|
31
|
+
font-family:monospace;
|
32
|
+
font-size:14px;
|
33
|
+
line-height:1.42857142857143;
|
34
|
+
}
|
35
|
+
#man h2, #man ol.man {
|
36
|
+
font-size:16px;
|
37
|
+
line-height:1.25
|
38
|
+
}
|
39
|
+
#man h1 {
|
40
|
+
font-size:20px;
|
41
|
+
line-height:2;
|
42
|
+
}
|
43
|
+
|
44
|
+
/* TEXT STYLES */
|
45
|
+
|
46
|
+
#man {
|
47
|
+
text-align:justify;
|
48
|
+
background:#fff;
|
49
|
+
}
|
50
|
+
#man, #man code, #man pre, #man pre code,
|
51
|
+
#man tt, #man kbd, #man samp { color:#131211 }
|
52
|
+
#man h1, #man h2, #man h3, #man h4 { color:#030201 }
|
53
|
+
#man ol.man, #man ol.man li { color:#636261 }
|
54
|
+
|
55
|
+
#man code, #man strong, #man b {
|
56
|
+
font-weight:bold;
|
57
|
+
color:#131211;
|
58
|
+
}
|
59
|
+
|
60
|
+
#man em, #man var, #man u {
|
61
|
+
font-style:italic;
|
62
|
+
color:#434241;
|
63
|
+
text-decoration:none;
|
64
|
+
}
|
65
|
+
|
66
|
+
#man pre {
|
67
|
+
background:#edeceb;
|
68
|
+
padding:5px 1ex;
|
69
|
+
border-left:1ex solid #ddd;
|
70
|
+
}
|
71
|
+
#man pre code {
|
72
|
+
font-weight:normal;
|
73
|
+
background:inherit;
|
74
|
+
}
|
75
|
+
|
76
|
+
/* DOCUMENT HEADER AND FOOTER AREAS */
|
77
|
+
|
78
|
+
#man ol.man, #man ol.man li {
|
79
|
+
margin:3px 0 10px 0;
|
80
|
+
padding:0;
|
81
|
+
float:left;
|
82
|
+
width:33%;
|
83
|
+
list-style-type:none;
|
84
|
+
text-transform:uppercase;
|
85
|
+
color:#999;
|
86
|
+
letter-spacing:1px;
|
87
|
+
}
|
88
|
+
#man ol.man { width:100% }
|
89
|
+
#man ol.man li.tl { text-align:left }
|
90
|
+
#man ol.man li.tc { text-align:center; letter-spacing:4px }
|
91
|
+
#man ol.man li.tr { text-align:right; float:right }
|
92
|
+
|
93
|
+
/* SECTION TOC NAVIGATION */
|
94
|
+
|
95
|
+
#man div.man-navigation {
|
96
|
+
position:fixed;
|
97
|
+
top:0;
|
98
|
+
left:96ex;
|
99
|
+
height:100%;
|
100
|
+
width:100%;
|
101
|
+
padding:1ex 0 0 2ex;
|
102
|
+
border-left:0.25ex solid #DCDCDC;
|
103
|
+
background-color: #F5F5F5;
|
104
|
+
}
|
105
|
+
#man div.man-navigation a { display:block; margin-bottom:1.5ex }
|
@@ -0,0 +1,27 @@
|
|
1
|
+
/* toc.css - enable table of contents */
|
2
|
+
|
3
|
+
.man-navigation {
|
4
|
+
display:block !important;
|
5
|
+
position:fixed;
|
6
|
+
top:0;
|
7
|
+
left:113ex; /* .mp width + padding */
|
8
|
+
height:100%;
|
9
|
+
width:100%;
|
10
|
+
padding:48px 0 0 0;
|
11
|
+
border-left:1px solid #dbdbdb;
|
12
|
+
background:#eee;
|
13
|
+
}
|
14
|
+
.man-navigation a,
|
15
|
+
.man-navigation a:hover,
|
16
|
+
.man-navigation a:link,
|
17
|
+
.man-navigation a:visited {
|
18
|
+
display:block;
|
19
|
+
margin:0;
|
20
|
+
padding:5px 2px 5px 30px;
|
21
|
+
color:#999;
|
22
|
+
text-decoration:none;
|
23
|
+
}
|
24
|
+
.man-navigation a:hover {
|
25
|
+
color:#111;
|
26
|
+
text-decoration:underline;
|
27
|
+
}
|
@@ -0,0 +1,173 @@
|
|
1
|
+
require 'mustache'
|
2
|
+
|
3
|
+
module Ronn
|
4
|
+
# A Mustache Template for HTML formatting.
|
5
|
+
class Template < Mustache
|
6
|
+
self.template_path = File.dirname(__FILE__) + '/template'
|
7
|
+
self.template_extension = 'html'
|
8
|
+
|
9
|
+
def initialize(document, style_path = ENV['RONN_STYLE'].to_s.split(':'))
|
10
|
+
super()
|
11
|
+
@document = document
|
12
|
+
@style_path = style_path + [Template.template_path]
|
13
|
+
end
|
14
|
+
|
15
|
+
def render(template = 'default')
|
16
|
+
super template[0, 1] == '/' ? File.read(template) : partial(template)
|
17
|
+
end
|
18
|
+
|
19
|
+
##
|
20
|
+
# Basic document attributes
|
21
|
+
|
22
|
+
def name
|
23
|
+
@document.name
|
24
|
+
end
|
25
|
+
|
26
|
+
def section
|
27
|
+
@document.section
|
28
|
+
end
|
29
|
+
|
30
|
+
def tagline
|
31
|
+
@document.tagline
|
32
|
+
end
|
33
|
+
alias tagline? tagline
|
34
|
+
|
35
|
+
def name_and_section?
|
36
|
+
name && section
|
37
|
+
end
|
38
|
+
|
39
|
+
def title
|
40
|
+
if !name_and_section? && tagline
|
41
|
+
tagline
|
42
|
+
else
|
43
|
+
[page_name, tagline].compact.join(' - ')
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
def custom_title?
|
48
|
+
!name_and_section? && tagline
|
49
|
+
end
|
50
|
+
|
51
|
+
def page_name
|
52
|
+
if section
|
53
|
+
"#{name}(#{section})"
|
54
|
+
else
|
55
|
+
name
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
def generator
|
60
|
+
"nRonn/v#{Ronn.version} (https://github.com/n-ronn/nronn/tree/#{Ronn.revision})"
|
61
|
+
end
|
62
|
+
|
63
|
+
def manual
|
64
|
+
@document.manual
|
65
|
+
end
|
66
|
+
|
67
|
+
def organization
|
68
|
+
@document.organization
|
69
|
+
end
|
70
|
+
|
71
|
+
def date
|
72
|
+
@document.date.strftime('%B %Y')
|
73
|
+
end
|
74
|
+
|
75
|
+
def wrap_class_name
|
76
|
+
'mp'
|
77
|
+
end
|
78
|
+
|
79
|
+
##
|
80
|
+
# Section TOCs
|
81
|
+
|
82
|
+
def section_heads
|
83
|
+
@document.section_heads.map do |id, text|
|
84
|
+
{
|
85
|
+
id: id,
|
86
|
+
text: text
|
87
|
+
}
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
##
|
92
|
+
# Styles
|
93
|
+
|
94
|
+
# Array of style module names as given on the command line.
|
95
|
+
def styles
|
96
|
+
@document.styles
|
97
|
+
end
|
98
|
+
|
99
|
+
# Array of stylesheet info hashes.
|
100
|
+
def stylesheets
|
101
|
+
styles.zip(style_files).map do |name, path|
|
102
|
+
base = File.basename(path, '.css')
|
103
|
+
raise "style not found: #{style.inspect}" if path.nil?
|
104
|
+
{
|
105
|
+
name: name,
|
106
|
+
path: path,
|
107
|
+
base: File.basename(path, '.css'),
|
108
|
+
media: base =~ /(print|screen)$/ ? $1 : 'all'
|
109
|
+
}
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
# All embedded stylesheets.
|
114
|
+
def stylesheet_tags
|
115
|
+
stylesheets
|
116
|
+
.map { |style| inline_stylesheet(style[:path], style[:media]) }
|
117
|
+
.join("\n ")
|
118
|
+
end
|
119
|
+
|
120
|
+
attr_accessor :style_path
|
121
|
+
|
122
|
+
# Array of expanded stylesheet file names. If a file cannot be found, the
|
123
|
+
# resulting array will include nil elements in positions corresponding to
|
124
|
+
# the stylesheets array.
|
125
|
+
def style_files
|
126
|
+
styles.map do |name|
|
127
|
+
next name if name.include?('/')
|
128
|
+
style_path
|
129
|
+
.reject { |p| p.strip.empty? }
|
130
|
+
.map { |p| File.join(p, "#{name}.css") }
|
131
|
+
.detect { |file| File.exist?(file) }
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
# Array of style names for which no file could be found.
|
136
|
+
def missing_styles
|
137
|
+
style_files
|
138
|
+
.zip(files)
|
139
|
+
.select { |_style, file| file.nil? }
|
140
|
+
.map { |style, _file| style }
|
141
|
+
end
|
142
|
+
|
143
|
+
##
|
144
|
+
# TEMPLATE CSS LOADING
|
145
|
+
|
146
|
+
def inline_stylesheet(path, media = 'all')
|
147
|
+
data = File.read(path)
|
148
|
+
data.gsub!(%r{/\*.+?\*/}m, '') # comments
|
149
|
+
data.gsub!(/([;{,]) *\n/m, '\1') # end-of-line whitespace
|
150
|
+
data.gsub!(/\n{2,}/m, "\n") # collapse lines
|
151
|
+
data.gsub!(/[; ]+\}/, '}') # superfluous trailing semi-colons
|
152
|
+
data.gsub!(/([{;,+])[ ]+/, '\1') # whitespace around things
|
153
|
+
data.gsub!(/[ \t]+/m, ' ') # coalescing whitespace elsewhere
|
154
|
+
data.gsub!(/^/, ' ') # indent
|
155
|
+
data.strip!
|
156
|
+
[
|
157
|
+
"<style type='text/css' media='#{media}'>",
|
158
|
+
"/* style: #{File.basename(path, '.css')} */",
|
159
|
+
data,
|
160
|
+
'</style>'
|
161
|
+
].join("\n ")
|
162
|
+
end
|
163
|
+
|
164
|
+
def remote_stylesheet(name, media = 'all')
|
165
|
+
path = File.expand_path("../template/#{name}.css", __FILE__)
|
166
|
+
"<link rel='stylesheet' type='text/css' media='#{media}' href='#{path}'>"
|
167
|
+
end
|
168
|
+
|
169
|
+
def stylesheet(_path, media = 'all')
|
170
|
+
inline_stylesheet(name, media)
|
171
|
+
end
|
172
|
+
end
|
173
|
+
end
|
data/lib/ronn/utils.rb
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
require 'set'
|
2
|
+
require 'cgi'
|
3
|
+
|
4
|
+
module Ronn
|
5
|
+
# Miscellaneous utilities.
|
6
|
+
module Utils
|
7
|
+
# All HTML 4 elements and some that are in common use.
|
8
|
+
HTML = %w[
|
9
|
+
a abbr acronym address applet area b base basefont bdo big blockquote body
|
10
|
+
br button caption center cite code col colgroup dd del dfn dir div dl dt
|
11
|
+
em fieldset font form frame frameset h1 h2 h3 h4 h5 h6 head hr html i
|
12
|
+
iframe img input ins isindex kbd label legend li link map menu meta
|
13
|
+
noframes noscript object ol optgroup option p param pre q s samp script
|
14
|
+
select small span strike strong style sub sup table tbody td textarea
|
15
|
+
tfoot th thead title tr tt u ul var
|
16
|
+
].to_set
|
17
|
+
|
18
|
+
# Block elements.
|
19
|
+
HTML_BLOCK = %w[
|
20
|
+
blockquote body colgroup dd div dl dt fieldset form frame frameset
|
21
|
+
h1 h2 h3 h4 h5 h6 hr head html iframe li noframes noscript
|
22
|
+
object ol optgroup option p param pre script select
|
23
|
+
style table tbody td textarea tfoot th thead title tr tt ul
|
24
|
+
].to_set
|
25
|
+
|
26
|
+
# Inline elements
|
27
|
+
HTML_INLINE = HTML - HTML_BLOCK
|
28
|
+
|
29
|
+
# Elements that don't have a closing tag.
|
30
|
+
HTML_EMPTY = %w[area base basefont br col hr input link meta].to_set
|
31
|
+
|
32
|
+
def block_element?(name)
|
33
|
+
HTML_BLOCK.include?(name)
|
34
|
+
end
|
35
|
+
|
36
|
+
def inline_element?(name)
|
37
|
+
HTML_INLINE.include?(name)
|
38
|
+
end
|
39
|
+
|
40
|
+
def empty_element?(name)
|
41
|
+
HTML_EMPTY.include?(name)
|
42
|
+
end
|
43
|
+
|
44
|
+
def html_element?(name)
|
45
|
+
HTML.include?(name)
|
46
|
+
end
|
47
|
+
|
48
|
+
def child_of?(node, tag)
|
49
|
+
while node
|
50
|
+
return true if node.name && node.name.downcase == tag
|
51
|
+
return false if node.document?
|
52
|
+
node = node.parent
|
53
|
+
end
|
54
|
+
false
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
data/lib/ronn.rb
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
# Ronn is a humane text format and toolchain for authoring manpages (and
|
2
|
+
# things that appear as manpages from a distance). Use it to build /
|
3
|
+
# install standard Unix roff(7) formatted manpages or to generate
|
4
|
+
# beautiful HTML manpages.
|
5
|
+
module Ronn
|
6
|
+
autoload :Document, 'ronn/document'
|
7
|
+
autoload :Index, 'ronn/index'
|
8
|
+
autoload :Template, 'ronn/template'
|
9
|
+
autoload :Roff, 'ronn/roff'
|
10
|
+
autoload :Server, 'ronn/server'
|
11
|
+
|
12
|
+
# Create a new Ronn::Document for the given ronn file. See
|
13
|
+
# Ronn::Document.new for usage information.
|
14
|
+
def self.new(filename, attributes = {}, &block)
|
15
|
+
Document.new(filename, attributes, &block)
|
16
|
+
end
|
17
|
+
|
18
|
+
# truthy when this a release (\d\.\d\.\d) version.
|
19
|
+
def self.release?
|
20
|
+
revision != '' && !revision.include?('-')
|
21
|
+
end
|
22
|
+
|
23
|
+
# A semantic version number based on the git revision. The third element
|
24
|
+
# of the version is incremented by the commit offset, such that version
|
25
|
+
# 0.6.6-5-gdacd74b => 0.6.11
|
26
|
+
def self.version
|
27
|
+
ver = revision[/^[0-9.-]+/].split(/[.-]/).map(&:to_i)
|
28
|
+
ver[2] += ver.pop while ver.size > 3
|
29
|
+
ver.join('.')
|
30
|
+
end
|
31
|
+
|
32
|
+
# The string revision as reported by: git-describe --tags. This is just the
|
33
|
+
# tag name when a tag references the HEAD commit (e.g. 0.6.25). When the HEAD
|
34
|
+
# commit is not tagged, this is a "<tag>-<offset>-<sha1>" string:
|
35
|
+
# <tag> - closest tag name
|
36
|
+
# <offset> - number of commits ahead of <tag>
|
37
|
+
# <sha1> - 7c short SHA1 for HEAD
|
38
|
+
def self.revision
|
39
|
+
REV
|
40
|
+
end
|
41
|
+
|
42
|
+
# value generated by: rake rev
|
43
|
+
# or edit manually; I'm not sure of how rake rev interacts with git
|
44
|
+
# tags -apjanke
|
45
|
+
REV = '0.10.1.pre1'.freeze
|
46
|
+
VERSION = version
|
47
|
+
end
|
data/man/index.html
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Ronn</title>
|
5
|
+
<style>
|
6
|
+
body {
|
7
|
+
font-size:24px;
|
8
|
+
line-height:1.5;
|
9
|
+
font-family:georgia,serif;
|
10
|
+
color:#555;
|
11
|
+
}
|
12
|
+
div#index {
|
13
|
+
width:28em;
|
14
|
+
margin:0 auto;
|
15
|
+
}
|
16
|
+
h1 {
|
17
|
+
text-align:center;
|
18
|
+
font-weight:normal;
|
19
|
+
color:#000;
|
20
|
+
margin-bottom:0;
|
21
|
+
letter-spacing:-3px;
|
22
|
+
}
|
23
|
+
h3 {
|
24
|
+
text-align:center;
|
25
|
+
font-weight:normal;
|
26
|
+
color:#444;
|
27
|
+
margin-top:-20px;
|
28
|
+
margin-bottom:40px;
|
29
|
+
}
|
30
|
+
h4 {
|
31
|
+
font-weight:normal;
|
32
|
+
font-size:26px;
|
33
|
+
color:#111;
|
34
|
+
}
|
35
|
+
p, dl { margin-left:40px }
|
36
|
+
.aux { font-family:monospace;font-size:20px;letter-spacing:1px; }
|
37
|
+
.also { font-size:18px }
|
38
|
+
.copy { font-size:16px;text-align:center;color:#111 }
|
39
|
+
.man-ref { font-family:monospace;letter-spacing:-2px; }
|
40
|
+
</style>
|
41
|
+
</head>
|
42
|
+
<body>
|
43
|
+
<div id='index'>
|
44
|
+
<h1>Ronn</h1>
|
45
|
+
<h3>Builds manuals</h3>
|
46
|
+
|
47
|
+
<h4>Auxiliary</h4>
|
48
|
+
<p class='aux'>
|
49
|
+
<a href='http://github.com/apjanke/ronn-ng#readme'>README</a>,
|
50
|
+
<a href='http://github.com/apjanke/ronn-ng/blob/master/INSTALLING#files'>INSTALLING</a>,
|
51
|
+
<a href='http://github.com/apjanke/ronn-ng/blob/master/CHANGES#files'>CHANGES</a>,
|
52
|
+
<a href='http://github.com/apjanke/ronn-ng/blob/master/COPYING#files'>COPYING</a>,
|
53
|
+
<a href='http://github.com/apjanke/ronn-ng/blob/master/AUTHORS#files'>AUTHORS</a>
|
54
|
+
</p>
|
55
|
+
|
56
|
+
<h4>Manuals</h4>
|
57
|
+
<dl>
|
58
|
+
<dt><a class='man-ref' href='ronn.1.html'>ronn(1)</a></dt>
|
59
|
+
<dd>manual authoring tool</dd>
|
60
|
+
|
61
|
+
<dt><a class='man-ref' href='ronn-format.7.html'>ronn-format(7)</a></dt>
|
62
|
+
<dd>markdown-based text format for authoring manpages</dd>
|
63
|
+
</dl>
|
64
|
+
|
65
|
+
<h4>See Also</h4>
|
66
|
+
<p class='also'>
|
67
|
+
<a class='man-ref' href="http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man5/manpages.5.html">manpages(5)</a>,
|
68
|
+
<a class='man-ref' href="http://daringfireball.net/projects/markdown/syntax">markdown(7)</a>,
|
69
|
+
<a class='man-ref' href="http://man.cx/man(1)">man(1)</a>,
|
70
|
+
<a class='man-ref' href="http://man.cx/roff(7)">roff(7)</a>,
|
71
|
+
<a class='man-ref' href="http://man.cx/groff(1)">groff(1)</a>,
|
72
|
+
<a class='man-ref' href="http://mustache.github.com/mustache.5.html">mustache(5)</a>
|
73
|
+
</p>
|
74
|
+
|
75
|
+
<p class='copy'>Copyright © 2010 Ryan Tomayko, © 2018 Andrew Janke</p>
|
76
|
+
</div>
|
77
|
+
</body>
|
78
|
+
</html>
|
data/man/index.txt
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# manuals
|
2
|
+
ronn(1) ronn.1.ronn
|
3
|
+
ronn(5) ronn.5.ronn
|
4
|
+
ronn(7) ronn.7.ronn
|
5
|
+
|
6
|
+
# external manuals
|
7
|
+
roff(7) http://man.cx/roff(7)
|
8
|
+
grep(1) http://man.cx/grep(1)
|
9
|
+
groff(1) http://man.cx/groff(1)
|
10
|
+
sh(1) http://man.cx/sh(1posix)
|
11
|
+
test(1) http://man.cx/test(1)
|
12
|
+
fork(2) http://man.cx/fork(2)
|
13
|
+
man(1) http://man.cx/man(1)
|
14
|
+
markdown(7) http://daringfireball.net/projects/markdown/syntax
|
15
|
+
manpages(5) http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man5/manpages.5.html
|
data/man/ronn-format.7
ADDED
@@ -0,0 +1,145 @@
|
|
1
|
+
.\" generated with nRonn/v0.10.1
|
2
|
+
.\" https://github.com/n-ronn/nronn/tree/0.10.1.pre1
|
3
|
+
.TH "RONN\-FORMAT" "7" "December 2018" "nRonn 0.10.1.pre1" "Ronn Manual"
|
4
|
+
.SH "NAME"
|
5
|
+
\fBronn\-format\fR \- manual authoring format based on Markdown
|
6
|
+
.SH "SYNOPSIS"
|
7
|
+
.nf
|
8
|
+
name(1) \-\- short, single\-sentence description
|
9
|
+
=============================================
|
10
|
+
|
11
|
+
## SYNOPSIS
|
12
|
+
|
13
|
+
`name` [<optional>\|\.\|\.\|\.] <flags>
|
14
|
+
|
15
|
+
## DESCRIPTION
|
16
|
+
|
17
|
+
A normal paragraph\. This can span multiple lines and is terminated with two
|
18
|
+
or more line endings \-\- just like Markdown\.
|
19
|
+
|
20
|
+
Inline markup for `code`, `user input`, and **strong** are displayed
|
21
|
+
boldface; <variable>, _emphasis_, *emphasis*, are displayed in italics
|
22
|
+
(HTML) or underline (roff)\.
|
23
|
+
|
24
|
+
Manual references like sh(1), markdown(7), roff(7), etc\. are hyperlinked in
|
25
|
+
HTML output\.
|
26
|
+
|
27
|
+
Link to sections like [STANDARDS][], [SEE ALSO][], or [WITH A DIFFERENT LINK
|
28
|
+
TEXT][#SEE\-ALSO]\.
|
29
|
+
|
30
|
+
Definition lists:
|
31
|
+
|
32
|
+
* `\-a`, `\-\-argument`=[<value>]:
|
33
|
+
One or more paragraphs describing the argument\.
|
34
|
+
|
35
|
+
* You can put whatever you *want* here, really:
|
36
|
+
Nesting and paragraph spacing are respected\.
|
37
|
+
|
38
|
+
Frequently used sections:
|
39
|
+
|
40
|
+
## OPTIONS
|
41
|
+
## SYNTAX
|
42
|
+
## ENVIRONMENT
|
43
|
+
## RETURN VALUES
|
44
|
+
## STANDARDS
|
45
|
+
## SECURITY CONSIDERATIONS
|
46
|
+
## BUGS
|
47
|
+
## HISTORY
|
48
|
+
## AUTHOR
|
49
|
+
## COPYRIGHT
|
50
|
+
## SEE ALSO
|
51
|
+
.fi
|
52
|
+
.SH "DESCRIPTION"
|
53
|
+
The ronn(1) command converts text in a simple markup to Unix manual pages\. The syntax includes all Markdown formatting features, plus conventions for expressing the structure and various notations present in standard Unix manpages\.
|
54
|
+
.P
|
55
|
+
Not all roff(7) typesetting features can be expressed using ronn syntax\.
|
56
|
+
.SH "MANPAGE TITLE"
|
57
|
+
Manpages have a \fIname\fR, \fIsection\fR, and a one\-line \fIdescription\fR\. Files must start with a level one heading defining these attributes:
|
58
|
+
.IP "" 4
|
59
|
+
.nf
|
60
|
+
ls(1) \-\- list directory contents
|
61
|
+
================================
|
62
|
+
.fi
|
63
|
+
.IP "" 0
|
64
|
+
.P
|
65
|
+
Indicates that the manpage is named \fBls\fR in manual section \fB1\fR ("user commands")\.
|
66
|
+
.SH "SECTION HEADINGS"
|
67
|
+
Man section headings are expressed with markdown level two headings\. There are two syntaxes for level two headings\.
|
68
|
+
.P
|
69
|
+
Hash prefix syntax:
|
70
|
+
.IP "" 4
|
71
|
+
.nf
|
72
|
+
## HEADING TEXT
|
73
|
+
.fi
|
74
|
+
.IP "" 0
|
75
|
+
.P
|
76
|
+
Dash underline syntax:
|
77
|
+
.IP "" 4
|
78
|
+
.nf
|
79
|
+
HEADING TEXT
|
80
|
+
\-\-\-\-\-\-\-\-\-\-\-\-
|
81
|
+
.fi
|
82
|
+
.IP "" 0
|
83
|
+
.P
|
84
|
+
Section headings should be all uppercase and may not contain inline markup\.
|
85
|
+
.SH "INLINE MARKUP"
|
86
|
+
Manpages have a limited set of text formatting capabilities\. There's basically \fBboldface\fR and \fIitalics\fR (often displayed using \fIunderline\fR)\. Ronn uses the following bits of markdown(7) to accomplish this:
|
87
|
+
.TP
|
88
|
+
\fB\e`backticks\e`\fR (markdown compatible)
|
89
|
+
Code, flags, commands, and noun\-like things; typically displayed in in \fBboldface\fR\. All text included within \fBbackticks\fR is displayed literally; other inline markup is not processed\. HTML output: \fB<code>\fR\.
|
90
|
+
.TP
|
91
|
+
\fB**double\-stars**\fR (markdown compatible)
|
92
|
+
Also displayed in boldface\. Unlike backticks, inline markup is processed\. HTML output: \fB<strong>\fR\.
|
93
|
+
.TP
|
94
|
+
\fB<anglequotes>\fR (non\-compatible markdown extension)
|
95
|
+
User\-specified arguments, variables, or user input\. Typically displayed with \fIunderline\fR in roff output\. HTML output: \fB<var/>\fR\.
|
96
|
+
.TP
|
97
|
+
\fB_\fR\fIunderbars\fR\fB_\fR (markdown compatible)
|
98
|
+
Emphasis\. May be used for literal option values\. Typically displayed with \fIunderline\fR in roff output\. HTML output: \fB<em>\fR\.
|
99
|
+
.P
|
100
|
+
Here is grep(1)'s DESCRIPTION section represented in \fBronn\fR:
|
101
|
+
.IP "" 4
|
102
|
+
.nf
|
103
|
+
`Grep` searches the named input <FILE> (or standard input if
|
104
|
+
no files are named, or the file name `\-` is given) for lines
|
105
|
+
containing a match to the given <PATTERN>\. By default, `grep`
|
106
|
+
prints the matching lines\.
|
107
|
+
.fi
|
108
|
+
.IP "" 0
|
109
|
+
.SH "DEFINITION LISTS"
|
110
|
+
The definition list syntax is compatible with markdown's unordered list syntax but requires that the first line of each list item be terminated with a colon "\fB:\fR" character\. The contents of the first line is the \fIterm\fR; subsequent lines may be comprised of multiple paragraphs, code blocks, standard lists, and nested definition lists\.
|
111
|
+
.P
|
112
|
+
An example definition list, taken from BSD test(1)'s \fIDESCRIPTION\fR section:
|
113
|
+
.IP "" 4
|
114
|
+
.nf
|
115
|
+
The following primaries are used to construct expressions:
|
116
|
+
|
117
|
+
* `\-b` <file>:
|
118
|
+
True if <file> exists and is a block special file\.
|
119
|
+
|
120
|
+
* `\-c` <file>:
|
121
|
+
True if _file_ exists and is a character special file\.
|
122
|
+
|
123
|
+
* `\-d` <file>:
|
124
|
+
True if file exists and is a directory\.
|
125
|
+
.fi
|
126
|
+
.IP "" 0
|
127
|
+
.SH "LINKS"
|
128
|
+
All markdown(7) linking features are supported\.
|
129
|
+
.P
|
130
|
+
Markdown reference\-style links can be used to link to specific sections by name:
|
131
|
+
.IP "" 4
|
132
|
+
.nf
|
133
|
+
## SECTION 1
|
134
|
+
|
135
|
+
See the following section\.
|
136
|
+
|
137
|
+
## SECTION 2
|
138
|
+
|
139
|
+
See [SECTION 1][] or [to put it another way][SECTION 1]\.
|
140
|
+
.fi
|
141
|
+
.IP "" 0
|
142
|
+
.P
|
143
|
+
The anchor name would be \fB#SECTION\-1\fR and \fB#SECTION\-2\fR\. All non\-word characters are removed and spaces are replaced by dashes\.
|
144
|
+
.SH "SEE ALSO"
|
145
|
+
ronn(1), markdown(7), roff(7)
|