docubot 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/docubot.rb +1 -1
- data/lib/docubot/writers/chm.rb +8 -9
- data/lib/docubot/writers/chm/hhc.erb +1 -1
- data/spec/samples/funkychars/HelloWorld.md +1 -0
- data/spec/samples/funkychars/Wrapper/0 Ampersand & Spaces Folder/0 Ampersand & Spaces File.md +1 -0
- data/spec/samples/funkychars/Wrapper/0 Ampersand & Spaces Folder/1 Ampersand_&_Underscores_File.md +1 -0
- data/spec/samples/funkychars/Wrapper/0 Ampersand & Spaces Folder/2 ASCII and Spaces File.md +1 -0
- data/spec/samples/funkychars/Wrapper/0 Ampersand & Spaces Folder/3 ASCII_and_Underscores_File.md +1 -0
- data/spec/samples/funkychars/Wrapper/0 Ampersand & Spaces Folder/4 It's a File!.md +1 -0
- data/spec/samples/funkychars/Wrapper/0 Ampersand & Spaces Folder/index.md +1 -0
- data/spec/samples/funkychars/Wrapper/1 Ampersand_&_Underscores_Folder/0 Ampersand & Spaces File.md +1 -0
- data/spec/samples/funkychars/Wrapper/1 Ampersand_&_Underscores_Folder/1 Ampersand_&_Underscores_File.md +1 -0
- data/spec/samples/funkychars/Wrapper/1 Ampersand_&_Underscores_Folder/2 ASCII and Spaces File.md +1 -0
- data/spec/samples/funkychars/Wrapper/1 Ampersand_&_Underscores_Folder/3 ASCII_and_Underscores_File.md +1 -0
- data/spec/samples/funkychars/Wrapper/1 Ampersand_&_Underscores_Folder/4 It's a File!.md +1 -0
- data/spec/samples/funkychars/Wrapper/1 Ampersand_&_Underscores_Folder/index.md +1 -0
- data/spec/samples/funkychars/Wrapper/2 ASCII and Spaces Folder/0 Ampersand & Spaces File.md +1 -0
- data/spec/samples/funkychars/Wrapper/2 ASCII and Spaces Folder/1 Ampersand_&_Underscores_File.md +1 -0
- data/spec/samples/funkychars/Wrapper/2 ASCII and Spaces Folder/2 ASCII and Spaces File.md +1 -0
- data/spec/samples/funkychars/Wrapper/2 ASCII and Spaces Folder/3 ASCII_and_Underscores_File.md +1 -0
- data/spec/samples/funkychars/Wrapper/2 ASCII and Spaces Folder/4 It's a File!.md +1 -0
- data/spec/samples/funkychars/Wrapper/2 ASCII and Spaces Folder/index.md +1 -0
- data/spec/samples/funkychars/Wrapper/3 ASCII_and_Underscores_Folder/0 Ampersand & Spaces File.md +1 -0
- data/spec/samples/funkychars/Wrapper/3 ASCII_and_Underscores_Folder/1 Ampersand_&_Underscores_File.md +1 -0
- data/spec/samples/funkychars/Wrapper/3 ASCII_and_Underscores_Folder/2 ASCII and Spaces File.md +1 -0
- data/spec/samples/funkychars/Wrapper/3 ASCII_and_Underscores_Folder/3 ASCII_and_Underscores_File.md +1 -0
- data/spec/samples/funkychars/Wrapper/3 ASCII_and_Underscores_Folder/4 It's a File!.md +1 -0
- data/spec/samples/funkychars/Wrapper/3 ASCII_and_Underscores_Folder/index.md +1 -0
- data/spec/samples/funkychars/Wrapper/4 It's a Folder!/0 Ampersand & Spaces File.md +1 -0
- data/spec/samples/funkychars/Wrapper/4 It's a Folder!/1 Ampersand_&_Underscores_File.md +1 -0
- data/spec/samples/funkychars/Wrapper/4 It's a Folder!/2 ASCII and Spaces File.md +1 -0
- data/spec/samples/funkychars/Wrapper/4 It's a Folder!/3 ASCII_and_Underscores_File.md +1 -0
- data/spec/samples/funkychars/Wrapper/4 It's a Folder!/4 It's a File!.md +1 -0
- data/spec/samples/funkychars/Wrapper/4 It's a Folder!/index.md +1 -0
- data/spec/samples/funkychars/_templates/_root/bg_green_bar_revised.gif +0 -0
- data/spec/samples/funkychars/_templates/_root/close.png +0 -0
- data/spec/samples/funkychars/_templates/_root/common.css +293 -0
- data/spec/samples/funkychars/_templates/_root/glossary.css +3 -0
- data/spec/samples/funkychars/_templates/_root/glossary.js +59 -0
- data/spec/samples/funkychars/_templates/_root/nvdevtools.js +31 -0
- data/spec/samples/funkychars/_templates/_root/nvidia-logo.gif +0 -0
- data/spec/samples/funkychars/_templates/_root/right-sidebar.png +0 -0
- data/spec/samples/funkychars/_templates/glossary.haml +6 -0
- data/spec/samples/funkychars/_templates/page.haml +1 -0
- data/spec/samples/funkychars/_templates/section.haml +10 -0
- data/spec/samples/funkychars/_templates/top.haml +26 -0
- data/spec/samples/funkychars/index.txt +7 -0
- metadata +51 -2
data/lib/docubot.rb
CHANGED
data/lib/docubot/writers/chm.rb
CHANGED
@@ -87,20 +87,19 @@ class DocuBot::CHMWriter < DocuBot::HTMLWriter
|
|
87
87
|
end
|
88
88
|
|
89
89
|
def write_hhc
|
90
|
-
|
91
|
-
|
92
|
-
|
90
|
+
contents = ERB.new( IO.read( SUPPORT / 'hhc.erb', encoding:'utf-8' ) ).result( binding )
|
91
|
+
# puts contents
|
92
|
+
File.open( @hhc, 'w' ){ |f| f << contents }
|
93
93
|
end
|
94
94
|
|
95
95
|
def write_hhp
|
96
|
-
|
97
|
-
|
98
|
-
|
96
|
+
contents = ERB.new( IO.read( SUPPORT / 'hhp.erb', encoding:'utf-8' ) ).result( binding )
|
97
|
+
# puts contents
|
98
|
+
File.open( @hhp, 'w' ){ |f| f << contents }
|
99
99
|
end
|
100
100
|
|
101
101
|
def write_hhk
|
102
|
-
|
103
|
-
|
104
|
-
end
|
102
|
+
contents = ERB.new( IO.read( SUPPORT / 'hhk.erb', encoding:'utf-8' ) ).result( binding )
|
103
|
+
File.open( @hhk, 'w' ){ |f| f << contents }
|
105
104
|
end
|
106
105
|
end
|
@@ -38,7 +38,7 @@ ICON = {
|
|
38
38
|
%>
|
39
39
|
<LI> <OBJECT type="text/sitemap">
|
40
40
|
<param name="Name" value="<%=CGI.escapeHTML child.title%>">
|
41
|
-
<param name="Local" value="<%=FileUtils.win_path( @html_path / child.link )
|
41
|
+
<param name="Local" value="<%=FileUtils.win_path( @html_path / child.link )%>">
|
42
42
|
<param name="ImageNumber" value="<%=icon%>">
|
43
43
|
</OBJECT>
|
44
44
|
<%@write_section[child] unless child.children.empty?%>
|
@@ -0,0 +1 @@
|
|
1
|
+
**Hello** _World!_
|
@@ -0,0 +1 @@
|
|
1
|
+
Ampersand and Spaces File (the Content)
|
data/spec/samples/funkychars/Wrapper/0 Ampersand & Spaces Folder/1 Ampersand_&_Underscores_File.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Ampersand and Underscores File (the Content)
|
@@ -0,0 +1 @@
|
|
1
|
+
ASCII and Spaces File (the Content)
|
data/spec/samples/funkychars/Wrapper/0 Ampersand & Spaces Folder/3 ASCII_and_Underscores_File.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ASCII and Underscores File (the Content)
|
@@ -0,0 +1 @@
|
|
1
|
+
It's a File! (the Content)
|
@@ -0,0 +1 @@
|
|
1
|
+
I'm a landing page!
|
data/spec/samples/funkychars/Wrapper/1 Ampersand_&_Underscores_Folder/0 Ampersand & Spaces File.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Ampersand and Spaces File (the Content)
|
@@ -0,0 +1 @@
|
|
1
|
+
Ampersand and Underscores File (the Content)
|
data/spec/samples/funkychars/Wrapper/1 Ampersand_&_Underscores_Folder/2 ASCII and Spaces File.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ASCII and Spaces File (the Content)
|
@@ -0,0 +1 @@
|
|
1
|
+
ASCII and Underscores File (the Content)
|
@@ -0,0 +1 @@
|
|
1
|
+
It's a File! (the Content)
|
@@ -0,0 +1 @@
|
|
1
|
+
I'm a landing page!
|
@@ -0,0 +1 @@
|
|
1
|
+
Ampersand and Spaces File (the Content)
|
data/spec/samples/funkychars/Wrapper/2 ASCII and Spaces Folder/1 Ampersand_&_Underscores_File.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Ampersand and Underscores File (the Content)
|
@@ -0,0 +1 @@
|
|
1
|
+
ASCII and Spaces File (the Content)
|
data/spec/samples/funkychars/Wrapper/2 ASCII and Spaces Folder/3 ASCII_and_Underscores_File.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ASCII and Underscores File (the Content)
|
@@ -0,0 +1 @@
|
|
1
|
+
It's a File! (the Content)
|
@@ -0,0 +1 @@
|
|
1
|
+
I'm a landing page!
|
data/spec/samples/funkychars/Wrapper/3 ASCII_and_Underscores_Folder/0 Ampersand & Spaces File.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Ampersand and Spaces File (the Content)
|
@@ -0,0 +1 @@
|
|
1
|
+
Ampersand and Underscores File (the Content)
|
data/spec/samples/funkychars/Wrapper/3 ASCII_and_Underscores_Folder/2 ASCII and Spaces File.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ASCII and Spaces File (the Content)
|
data/spec/samples/funkychars/Wrapper/3 ASCII_and_Underscores_Folder/3 ASCII_and_Underscores_File.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ASCII and Underscores File (the Content)
|
@@ -0,0 +1 @@
|
|
1
|
+
It's a File! (the Content)
|
@@ -0,0 +1 @@
|
|
1
|
+
I'm a landing page!
|
@@ -0,0 +1 @@
|
|
1
|
+
Ampersand and Spaces File (the Content)
|
@@ -0,0 +1 @@
|
|
1
|
+
Ampersand and Underscores File (the Content)
|
@@ -0,0 +1 @@
|
|
1
|
+
ASCII and Spaces File (the Content)
|
@@ -0,0 +1 @@
|
|
1
|
+
ASCII and Underscores File (the Content)
|
@@ -0,0 +1 @@
|
|
1
|
+
It's a File! (the Content)
|
@@ -0,0 +1 @@
|
|
1
|
+
I'm a landing page!
|
Binary file
|
Binary file
|
@@ -0,0 +1,293 @@
|
|
1
|
+
html, body
|
2
|
+
{
|
3
|
+
margin:0;
|
4
|
+
padding:0;
|
5
|
+
font-family: Verdana, Arial, Helvetica, sans-serif;
|
6
|
+
font-size: 1.1em;
|
7
|
+
font-style: normal;
|
8
|
+
font-weight: normal;
|
9
|
+
color: black;
|
10
|
+
background:white;
|
11
|
+
overflow-x: hidden;
|
12
|
+
}
|
13
|
+
|
14
|
+
#breadcrumb
|
15
|
+
{
|
16
|
+
margin:0;
|
17
|
+
background:black url(nvidia-logo.gif) no-repeat left center;
|
18
|
+
padding-left:56px;
|
19
|
+
font-family: 'Arial', sans-serif;
|
20
|
+
font-size:14px; font-weight:bold;
|
21
|
+
white-space:nowrap;
|
22
|
+
height:40px; line-height:40px; color:white; overflow:hidden;
|
23
|
+
color:#fff;
|
24
|
+
}
|
25
|
+
|
26
|
+
#breadcrumb a
|
27
|
+
{
|
28
|
+
color:#fff; text-decoration:none
|
29
|
+
}
|
30
|
+
|
31
|
+
#breadcrumb a:hover
|
32
|
+
{
|
33
|
+
color:#74b71b
|
34
|
+
}
|
35
|
+
#breadcrumb .sep
|
36
|
+
{
|
37
|
+
color:#999; font-weight:normal; padding:0 0.2em
|
38
|
+
}
|
39
|
+
|
40
|
+
#pagebody {
|
41
|
+
position:relative;
|
42
|
+
font-size: 70%;
|
43
|
+
margin-bottom: 0;
|
44
|
+
padding-top: 1em;
|
45
|
+
padding-bottom:10em;
|
46
|
+
}
|
47
|
+
|
48
|
+
#pagebody h1 {
|
49
|
+
background:#666; color:#ccc; border:1px solid #333; font-size:100%; padding:0.2em 1em; line-height:1em ! important;
|
50
|
+
height:auto ! important; margin-top:1.5em
|
51
|
+
}
|
52
|
+
|
53
|
+
#gutter {
|
54
|
+
position:absolute;
|
55
|
+
top:0;
|
56
|
+
right:0;
|
57
|
+
height:100%;
|
58
|
+
width:360px;
|
59
|
+
background:white url(right-sidebar.png) repeat-y top left;
|
60
|
+
z-index:0;
|
61
|
+
}
|
62
|
+
|
63
|
+
div#mainbody
|
64
|
+
{
|
65
|
+
font-size:8pt;
|
66
|
+
margin: 0 360px 0 10px;
|
67
|
+
padding: 0;
|
68
|
+
padding-bottom:60em;
|
69
|
+
position:relative;
|
70
|
+
z-index:10;
|
71
|
+
}
|
72
|
+
|
73
|
+
body.nosidebar div#mainbody
|
74
|
+
{
|
75
|
+
margin-right:0px;
|
76
|
+
}
|
77
|
+
|
78
|
+
body.nosidebar #gutter {
|
79
|
+
display:none;
|
80
|
+
}
|
81
|
+
|
82
|
+
div#mainbody
|
83
|
+
{
|
84
|
+
padding-bottom:2em;
|
85
|
+
}
|
86
|
+
|
87
|
+
div.section
|
88
|
+
{
|
89
|
+
margin-left:1em
|
90
|
+
}
|
91
|
+
|
92
|
+
a:link, a:visited { white-space:nowrap; color:#6e8e34 }
|
93
|
+
a:hover { color:#74b71b }
|
94
|
+
|
95
|
+
a.hsglossaryreference {
|
96
|
+
color:#000; cursor:help; border-color:#666 ! important
|
97
|
+
}
|
98
|
+
a.hsglossaryreference:hover { border-color:#74b71b ! important }
|
99
|
+
|
100
|
+
ul { margin-left:2em; clear:left }
|
101
|
+
|
102
|
+
strong { white-space:nowrap }
|
103
|
+
|
104
|
+
h1 {
|
105
|
+
margin:0;
|
106
|
+
padding-left:14px;
|
107
|
+
padding-right:50px;
|
108
|
+
font-family: 'Arial', sans-serif;
|
109
|
+
white-space:nowrap;
|
110
|
+
font-size:18px;
|
111
|
+
background:#6eb103 url(bg_green_bar_revised.gif) repeat-x;
|
112
|
+
height:30px; line-height:30px; color:white; overflow:hidden;
|
113
|
+
border-bottom:1px solid #999
|
114
|
+
}
|
115
|
+
|
116
|
+
h2
|
117
|
+
{
|
118
|
+
clear:both;
|
119
|
+
margin-top:4em;
|
120
|
+
}
|
121
|
+
h2, h3, h4
|
122
|
+
{
|
123
|
+
border-bottom:1px solid #dddddd;
|
124
|
+
font-size:100%;
|
125
|
+
margin-bottom:0.5em;
|
126
|
+
}
|
127
|
+
h2.first-child, h3.first-child, h4.first-child
|
128
|
+
{
|
129
|
+
margin-top:0
|
130
|
+
}
|
131
|
+
h3, h4
|
132
|
+
{
|
133
|
+
margin-top:2em;
|
134
|
+
color:#666;
|
135
|
+
}
|
136
|
+
|
137
|
+
p, li, fieldset, dl
|
138
|
+
{
|
139
|
+
margin:0;
|
140
|
+
padding:0;
|
141
|
+
padding-right:1em;
|
142
|
+
margin-bottom:1em
|
143
|
+
}
|
144
|
+
|
145
|
+
.TODO
|
146
|
+
{
|
147
|
+
font-family: courier new;
|
148
|
+
color: #ff80ff;
|
149
|
+
font-size: 9pt;
|
150
|
+
font-weight: bold
|
151
|
+
}
|
152
|
+
|
153
|
+
.sidebar, .diagram
|
154
|
+
{
|
155
|
+
text-align: center;
|
156
|
+
font-family: tahoma,sans-serif;
|
157
|
+
color: #665555;
|
158
|
+
font-size: 7pt;
|
159
|
+
font-weight: bold;
|
160
|
+
}
|
161
|
+
|
162
|
+
.diagram {
|
163
|
+
margin:1.8em 1em;
|
164
|
+
}
|
165
|
+
|
166
|
+
.sidebar
|
167
|
+
{
|
168
|
+
width: 350px;
|
169
|
+
float: right;
|
170
|
+
clear: right;
|
171
|
+
margin:0;
|
172
|
+
padding:0;
|
173
|
+
margin-right: -360px;
|
174
|
+
margin-left: 1em;
|
175
|
+
}
|
176
|
+
|
177
|
+
.sidebar img, .diagram img
|
178
|
+
{
|
179
|
+
display:block;
|
180
|
+
margin:0 auto;
|
181
|
+
margin-bottom:0.5em;
|
182
|
+
}
|
183
|
+
|
184
|
+
img.floatcap
|
185
|
+
{
|
186
|
+
float:left;
|
187
|
+
margin-right:1em;
|
188
|
+
margin-bottom:1em;
|
189
|
+
margin-top:2px;
|
190
|
+
}
|
191
|
+
|
192
|
+
.moreinfo
|
193
|
+
{
|
194
|
+
font-style:italic;
|
195
|
+
color:#666;
|
196
|
+
}
|
197
|
+
|
198
|
+
.moreinfo a
|
199
|
+
{
|
200
|
+
color: #6e8e34
|
201
|
+
}
|
202
|
+
.moreinfo a:hover
|
203
|
+
{
|
204
|
+
color: #76b900
|
205
|
+
}
|
206
|
+
|
207
|
+
p.aside
|
208
|
+
{
|
209
|
+
margin-left:4em
|
210
|
+
}
|
211
|
+
|
212
|
+
div#nonscrollingpagefooter
|
213
|
+
{
|
214
|
+
background:white;
|
215
|
+
margin-bottom:0;
|
216
|
+
margin-top:4em;
|
217
|
+
clear:both;
|
218
|
+
}
|
219
|
+
|
220
|
+
div.tryit
|
221
|
+
{
|
222
|
+
border:1px solid #76b900;
|
223
|
+
background:#eef6df;
|
224
|
+
margin:2em 50px;
|
225
|
+
padding:0;
|
226
|
+
}
|
227
|
+
div.tryit h3
|
228
|
+
{
|
229
|
+
background:#76b900;
|
230
|
+
color:white;
|
231
|
+
font-style:normal;
|
232
|
+
padding:2px 0.5em;
|
233
|
+
margin:0;
|
234
|
+
margin-bottom:1em
|
235
|
+
}
|
236
|
+
div.tryit img.preview
|
237
|
+
{
|
238
|
+
float:right;
|
239
|
+
width:180px;
|
240
|
+
margin:-1em 0 1em 1em;
|
241
|
+
}
|
242
|
+
div.tryit ol
|
243
|
+
{
|
244
|
+
margin:1em;
|
245
|
+
padding:0;
|
246
|
+
}
|
247
|
+
div.tryit li
|
248
|
+
{
|
249
|
+
margin:0;
|
250
|
+
margin-left:3em;
|
251
|
+
margin-bottom:1em
|
252
|
+
}
|
253
|
+
div.tryit .results
|
254
|
+
{
|
255
|
+
font-style:italic;
|
256
|
+
color:#666
|
257
|
+
}
|
258
|
+
|
259
|
+
sup
|
260
|
+
{
|
261
|
+
font-size:85%
|
262
|
+
}
|
263
|
+
|
264
|
+
#known-issues h3 { font-style:normal; margin-bottom:0.2em; margin-top:3em; margin-right:1em }
|
265
|
+
#known-issues h3 span.issue_num { margin-left:1.5em; font-weight:normal; font-size:85%; color:#666; line-height:1.2em; float:right; margin-top:-1.2em; margin-right:1em }
|
266
|
+
#known-issues div.description { margin-bottom:2em }
|
267
|
+
#known-issues p.workaround { margin-left:2em }
|
268
|
+
#known-issues p.workaround strong { color:#666 }
|
269
|
+
|
270
|
+
fieldset { margin-bottom:1.5em; margin-left:1em; padding:0.5em; border-right:none; }
|
271
|
+
legend { font-weight:bold; color:#666 }
|
272
|
+
fieldset dl { margin:0 1em }
|
273
|
+
fieldset p { margin:1em 2em }
|
274
|
+
dl.section { margin-left:1em }
|
275
|
+
dt { font-weight:bold; font-style:normal; margin-top:0.8em }
|
276
|
+
dd { margin-bottom:0.8em; margin-left:0; }
|
277
|
+
dd p { margin-bottom:0.4em }
|
278
|
+
dd ul { margin-left:3em; margin-top:0.4em; }
|
279
|
+
dd ul li { margin-bottom:0 }
|
280
|
+
|
281
|
+
div#pagefooter {
|
282
|
+
clear:right;
|
283
|
+
margin-top:30em ! important; margin-bottom:1em ! important; width:25em; overflow:hidden; white-space:nowrap;
|
284
|
+
background:#eee; border:1px solid #ccc; border-left:none; color:#999; font-size:7pt ! important; padding:0.1em 1em
|
285
|
+
}
|
286
|
+
|
287
|
+
ul#children { margin-left:4em ! important; font-weight:bold; color:#ccc; }
|
288
|
+
ul#children .summary { font-weight:normal; color:#555; }
|
289
|
+
ul.compact, ul#children { margin-top:-0.5em }
|
290
|
+
ul.compact li, ul#children li { margin-bottom:0 }
|
291
|
+
body.release-notes h3 { margin-left:2em }
|
292
|
+
body.release-notes ul { margin-left:4em; margin-top:0; }
|
293
|
+
body.release-notes li { margin-bottom:0; margin-top:0; padding:0 ! important; margin-left:1em; line-height:105%; }
|
@@ -0,0 +1,3 @@
|
|
1
|
+
#glossary-box { display:none; position:absolute; width:30%; background:#e0efcc; border:1px solid #82a851; padding:0.5em 0.9em; font-size:9pt; font-family:Calibri, Tahoma; z-index:50; }
|
2
|
+
span.glossary { color:#36401C; border-bottom:1px dashed #6e8e34; cursor:help; }
|
3
|
+
span.glossary-missing { border-bottom:1px dotted #900 }
|
@@ -0,0 +1,59 @@
|
|
1
|
+
function handleEvent(obj,eventName,callback,useCapture){
|
2
|
+
return obj.addEventListener ? obj.addEventListener(eventName,callback,useCapture||false) : obj.attachEvent("on"+eventName,callback);
|
3
|
+
}
|
4
|
+
|
5
|
+
cssClass = {
|
6
|
+
_killCache : {},
|
7
|
+
_findCache : {},
|
8
|
+
add : function cssClassAdd(obj,className){
|
9
|
+
this.kill(obj,className);
|
10
|
+
obj.className+=(obj.className.length?' ':'')+className;
|
11
|
+
},
|
12
|
+
kill : function cssClassKill(obj,className){
|
13
|
+
var re = this._killCache[className] || (this._killCache[className]=new RegExp('(?:^|\\s+)'+className+'(?:\\s+|$)','g') );
|
14
|
+
obj.className = obj.className.replace(re,'');
|
15
|
+
},
|
16
|
+
has : function cssClassHas(obj,className){
|
17
|
+
var re = this._findCache[className] || (this._findCache[className]=new RegExp('(?:^|\\s+)'+className+'(?:\\s+|$)') );
|
18
|
+
return re.test( obj.className );
|
19
|
+
}
|
20
|
+
};
|
21
|
+
|
22
|
+
function glossaryClick(evt){
|
23
|
+
if (!evt) evt=event;
|
24
|
+
var target = evt.target || evt.srcElement;
|
25
|
+
var term = target.getAttribute('term') || target.innerHTML;
|
26
|
+
var box = document.getElementById('glossary-box');
|
27
|
+
box.style.display = 'block';
|
28
|
+
var scroll = (document.documentElement.scrollTop || document.body.scrollTop )*1;
|
29
|
+
var offset = box.parentNode.offsetTop*1;
|
30
|
+
box.style.left = (evt.clientX+5) + 'px';
|
31
|
+
box.style.top = (evt.clientY+5) + scroll - offset + 'px';
|
32
|
+
|
33
|
+
var html = $glossaryTerms[term.toLowerCase()];
|
34
|
+
box.innerHTML = html;
|
35
|
+
|
36
|
+
evt.cancelBubble = true;
|
37
|
+
if (evt.stopPropogation) evt.stopPropogation();
|
38
|
+
return false;
|
39
|
+
}
|
40
|
+
|
41
|
+
handleEvent(window,'load',function(){
|
42
|
+
for ( var spans=document.getElementsByTagName('span'),i=spans.length-1; i>=0; --i ){
|
43
|
+
var span = spans[i];
|
44
|
+
if (cssClass.has(span,'glossary')){
|
45
|
+
var term = span.getAttribute('term') || span.innerHTML;
|
46
|
+
if ($glossaryTerms[term.toLowerCase()]){
|
47
|
+
handleEvent(span,'click',glossaryClick);
|
48
|
+
}else{
|
49
|
+
cssClass.kill(span,'glossary');
|
50
|
+
cssClass.add(span,'glossary-missing');
|
51
|
+
}
|
52
|
+
|
53
|
+
}
|
54
|
+
}
|
55
|
+
var box = document.getElementById('glossary-box');
|
56
|
+
handleEvent( document.body, 'click', function(){
|
57
|
+
box.style.display = 'none';
|
58
|
+
});
|
59
|
+
});
|
@@ -0,0 +1,31 @@
|
|
1
|
+
function handleEvent(obj,eventName,callback,useCapture){
|
2
|
+
return obj.addEventListener ? obj.addEventListener(eventName,callback,useCapture||false) : obj.attachEvent("on"+eventName,callback);
|
3
|
+
}
|
4
|
+
|
5
|
+
cssClass = {
|
6
|
+
_killCache : {},
|
7
|
+
_findCache : {},
|
8
|
+
add : function cssClassAdd(obj,className){
|
9
|
+
this.kill(obj,className);
|
10
|
+
obj.className+=(obj.className.length?' ':'')+className;
|
11
|
+
},
|
12
|
+
kill : function cssClassKill(obj,className){
|
13
|
+
var re = this._killCache[className] || (this._killCache[className]=new RegExp('(?:^|\\s+)'+className+'(?:\\s+|$)','g') );
|
14
|
+
obj.className = obj.className.replace(re,'');
|
15
|
+
},
|
16
|
+
has : function cssClassHas(obj,className){
|
17
|
+
var re = this._findCache[className] || (this._findCache[className]=new RegExp('(?:^|\\s+)'+className+'(?:\\s+|$)') );
|
18
|
+
return re.test( obj.className );
|
19
|
+
}
|
20
|
+
};
|
21
|
+
function isFirstChild(node){
|
22
|
+
return node.parentNode.firstChild==node;
|
23
|
+
}
|
24
|
+
handleEvent(window,'load',function(){
|
25
|
+
// Add first-child CSS class since :first-child pseudo-class doesn't work for old IE
|
26
|
+
for ( var tags=['h2','h3','p','ul','dl','ol'],i=tags.length-1; i>=0; --i ){
|
27
|
+
for ( var all=document.getElementsByTagName(tags[i]),j=all.length-1; j>=0; --j ){
|
28
|
+
if (isFirstChild(all[j])) cssClass.add(all[j],'first-child');
|
29
|
+
}
|
30
|
+
}
|
31
|
+
});
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
= contents
|
@@ -0,0 +1,10 @@
|
|
1
|
+
- page.meta.style = 'nosidebar'
|
2
|
+
%p The following pages are part of <em>#{page.title}</em>:
|
3
|
+
%ul#children
|
4
|
+
- page.children.each do |child_page|
|
5
|
+
%li
|
6
|
+
%a{ :href=>root/child_page.html_path }= child_page.title
|
7
|
+
- if child_page.summary
|
8
|
+
.summary= child_page.summary
|
9
|
+
- unless contents.nil? or contents.empty?
|
10
|
+
#good-info= contents
|
@@ -0,0 +1,26 @@
|
|
1
|
+
!!! Strict
|
2
|
+
%html
|
3
|
+
%head
|
4
|
+
%meta(http-equiv='Content-Type' content='text/html; charset=utf-8')
|
5
|
+
%link{:rel=>'stylesheet', :type=>'text/css', :href=>"#{root}common.css", :media=>'all'}
|
6
|
+
%link{:rel=>'stylesheet', :type=>'text/css', :href=>"#{root}glossary.css", :media=>'all'}
|
7
|
+
%script{:type=>'text/javascript', :src=>"#{root}nvdevtools.js"}
|
8
|
+
%script{:type=>'text/javascript', :src=>"#{root}glossary-terms.js"}
|
9
|
+
%script{:type=>'text/javascript', :src=>"#{root}glossary.js"}
|
10
|
+
%title= page.title
|
11
|
+
%body{ :class=>page.style }
|
12
|
+
#pagetop
|
13
|
+
#breadcrumb
|
14
|
+
= global.short_title || global.title
|
15
|
+
%span.sep >
|
16
|
+
- breadcrumb.each do |node|
|
17
|
+
%a{ :href=>root/node.link }= node.page.short_title || node.title
|
18
|
+
%span.sep >
|
19
|
+
= page.title
|
20
|
+
%h1#title= page.title
|
21
|
+
#pagebody
|
22
|
+
#gutter
|
23
|
+
#glossary-box
|
24
|
+
#mainbody= contents
|
25
|
+
#pagefooter
|
26
|
+
Copyright ©#{Time.now.year}#{ " #{global.company}" if global.company }.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docubot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-07-31 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: haml
|
@@ -199,6 +199,55 @@ files:
|
|
199
199
|
- spec/samples/files/_static/foo.png
|
200
200
|
- spec/samples/files/_static/foo.psd
|
201
201
|
- spec/samples/files/_static/Thumbs.db
|
202
|
+
- spec/samples/funkychars/HelloWorld.md
|
203
|
+
- spec/samples/funkychars/index.txt
|
204
|
+
- spec/samples/funkychars/Wrapper/0 Ampersand & Spaces Folder/0 Ampersand & Spaces
|
205
|
+
File.md
|
206
|
+
- spec/samples/funkychars/Wrapper/0 Ampersand & Spaces Folder/1 Ampersand_&_Underscores_File.md
|
207
|
+
- spec/samples/funkychars/Wrapper/0 Ampersand & Spaces Folder/2 ASCII and Spaces File.md
|
208
|
+
- spec/samples/funkychars/Wrapper/0 Ampersand & Spaces Folder/3 ASCII_and_Underscores_File.md
|
209
|
+
- spec/samples/funkychars/Wrapper/0 Ampersand & Spaces Folder/4 It's a File!.md
|
210
|
+
- spec/samples/funkychars/Wrapper/0 Ampersand & Spaces Folder/index.md
|
211
|
+
- spec/samples/funkychars/Wrapper/1 Ampersand_&_Underscores_Folder/0 Ampersand & Spaces
|
212
|
+
File.md
|
213
|
+
- spec/samples/funkychars/Wrapper/1 Ampersand_&_Underscores_Folder/1 Ampersand_&_Underscores_File.md
|
214
|
+
- spec/samples/funkychars/Wrapper/1 Ampersand_&_Underscores_Folder/2 ASCII and Spaces
|
215
|
+
File.md
|
216
|
+
- spec/samples/funkychars/Wrapper/1 Ampersand_&_Underscores_Folder/3 ASCII_and_Underscores_File.md
|
217
|
+
- spec/samples/funkychars/Wrapper/1 Ampersand_&_Underscores_Folder/4 It's a File!.md
|
218
|
+
- spec/samples/funkychars/Wrapper/1 Ampersand_&_Underscores_Folder/index.md
|
219
|
+
- spec/samples/funkychars/Wrapper/2 ASCII and Spaces Folder/0 Ampersand & Spaces File.md
|
220
|
+
- spec/samples/funkychars/Wrapper/2 ASCII and Spaces Folder/1 Ampersand_&_Underscores_File.md
|
221
|
+
- spec/samples/funkychars/Wrapper/2 ASCII and Spaces Folder/2 ASCII and Spaces File.md
|
222
|
+
- spec/samples/funkychars/Wrapper/2 ASCII and Spaces Folder/3 ASCII_and_Underscores_File.md
|
223
|
+
- spec/samples/funkychars/Wrapper/2 ASCII and Spaces Folder/4 It's a File!.md
|
224
|
+
- spec/samples/funkychars/Wrapper/2 ASCII and Spaces Folder/index.md
|
225
|
+
- spec/samples/funkychars/Wrapper/3 ASCII_and_Underscores_Folder/0 Ampersand & Spaces
|
226
|
+
File.md
|
227
|
+
- spec/samples/funkychars/Wrapper/3 ASCII_and_Underscores_Folder/1 Ampersand_&_Underscores_File.md
|
228
|
+
- spec/samples/funkychars/Wrapper/3 ASCII_and_Underscores_Folder/2 ASCII and Spaces
|
229
|
+
File.md
|
230
|
+
- spec/samples/funkychars/Wrapper/3 ASCII_and_Underscores_Folder/3 ASCII_and_Underscores_File.md
|
231
|
+
- spec/samples/funkychars/Wrapper/3 ASCII_and_Underscores_Folder/4 It's a File!.md
|
232
|
+
- spec/samples/funkychars/Wrapper/3 ASCII_and_Underscores_Folder/index.md
|
233
|
+
- spec/samples/funkychars/Wrapper/4 It's a Folder!/0 Ampersand & Spaces File.md
|
234
|
+
- spec/samples/funkychars/Wrapper/4 It's a Folder!/1 Ampersand_&_Underscores_File.md
|
235
|
+
- spec/samples/funkychars/Wrapper/4 It's a Folder!/2 ASCII and Spaces File.md
|
236
|
+
- spec/samples/funkychars/Wrapper/4 It's a Folder!/3 ASCII_and_Underscores_File.md
|
237
|
+
- spec/samples/funkychars/Wrapper/4 It's a Folder!/4 It's a File!.md
|
238
|
+
- spec/samples/funkychars/Wrapper/4 It's a Folder!/index.md
|
239
|
+
- spec/samples/funkychars/_templates/glossary.haml
|
240
|
+
- spec/samples/funkychars/_templates/page.haml
|
241
|
+
- spec/samples/funkychars/_templates/section.haml
|
242
|
+
- spec/samples/funkychars/_templates/top.haml
|
243
|
+
- spec/samples/funkychars/_templates/_root/bg_green_bar_revised.gif
|
244
|
+
- spec/samples/funkychars/_templates/_root/close.png
|
245
|
+
- spec/samples/funkychars/_templates/_root/common.css
|
246
|
+
- spec/samples/funkychars/_templates/_root/glossary.css
|
247
|
+
- spec/samples/funkychars/_templates/_root/glossary.js
|
248
|
+
- spec/samples/funkychars/_templates/_root/nvdevtools.js
|
249
|
+
- spec/samples/funkychars/_templates/_root/nvidia-logo.gif
|
250
|
+
- spec/samples/funkychars/_templates/_root/right-sidebar.png
|
202
251
|
- spec/samples/glossary/Glossary.txt
|
203
252
|
- spec/samples/glossary/Some Page.md
|
204
253
|
- spec/samples/glossary/_glossary/complex.haml
|