docubot 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. data/bin/docubot +125 -125
  2. data/lib/docubot.rb +43 -43
  3. data/lib/docubot/bundle.rb +182 -182
  4. data/lib/docubot/converter.rb +28 -28
  5. data/lib/docubot/converters/haml.rb +9 -9
  6. data/lib/docubot/converters/markdown.rb +14 -14
  7. data/lib/docubot/index.rb +67 -67
  8. data/lib/docubot/link_tree.rb +111 -111
  9. data/lib/docubot/metasection.rb +61 -61
  10. data/lib/docubot/page.rb +167 -167
  11. data/lib/docubot/shells/default/0_License.md +59 -59
  12. data/lib/docubot/shells/default/Appendix/Glossary.md +4 -4
  13. data/lib/docubot/shells/default/Appendix/Index_Page.md +8 -8
  14. data/lib/docubot/shells/default/Appendix/Table of Contents.md +4 -4
  15. data/lib/docubot/shells/docubot-help/0_License.md +20 -20
  16. data/lib/docubot/shells/docubot-help/1_Getting_Started.md +47 -47
  17. data/lib/docubot/shells/docubot-help/2_Basic_Concepts/4 Adding Images.md +1 -1
  18. data/lib/docubot/shells/docubot-help/2_Basic_Concepts/index.md +5 -5
  19. data/lib/docubot/shells/docubot-help/3_Advanced_Topics/Controlling Glossary.md +2 -2
  20. data/lib/docubot/shells/docubot-help/3_Advanced_Topics/Controlling Indexing.md +9 -9
  21. data/lib/docubot/shells/docubot-help/3_Advanced_Topics/Controlling the Table of Contents.md +5 -5
  22. data/lib/docubot/shells/docubot-help/4_Appendix/Glossary.md +4 -4
  23. data/lib/docubot/shells/docubot-help/4_Appendix/Index_Page.md +5 -5
  24. data/lib/docubot/shells/docubot-help/4_Appendix/Table of Contents.md +7 -7
  25. data/lib/docubot/shells/docubot-help/index.txt +7 -7
  26. data/lib/docubot/snippet.rb +19 -19
  27. data/lib/docubot/snippets/glossary.rb +7 -7
  28. data/lib/docubot/snippets/index_entries.rb +6 -6
  29. data/lib/docubot/templates/_root/glossary.css +3 -3
  30. data/lib/docubot/templates/_root/glossary.js +57 -57
  31. data/lib/docubot/templates/index.haml +14 -14
  32. data/lib/docubot/templates/toc.haml +2 -2
  33. data/lib/docubot/templates/top.haml +32 -32
  34. data/lib/docubot/writers/chm/hhc.erb +1 -1
  35. data/lib/docubot/writers/chm/hhk.erb +2 -2
  36. data/lib/docubot/writers/html.rb +87 -87
  37. data/spec/_all.rb +12 -12
  38. data/spec/_helper.rb +16 -16
  39. data/spec/bundle.rb +339 -339
  40. data/spec/command.rb +3 -3
  41. data/spec/converters.rb +2 -2
  42. data/spec/global.rb +27 -27
  43. data/spec/glossary.rb +94 -94
  44. data/spec/index.rb +2 -2
  45. data/spec/page.rb +80 -80
  46. data/spec/samples/attributes/defaults.haml +34 -34
  47. data/spec/samples/attributes/explicit1.haml +42 -42
  48. data/spec/samples/attributes/explicit2.haml +41 -41
  49. data/spec/samples/attributes/hidden.haml +39 -39
  50. data/spec/samples/attributes/index.md +8 -8
  51. data/spec/samples/collisions/page1.md +2 -2
  52. data/spec/samples/collisions/page1.textile +2 -2
  53. data/spec/samples/collisions/page2.haml +3 -3
  54. data/spec/samples/collisions/page2.html +2 -2
  55. data/spec/samples/collisions/page2.txt +2 -2
  56. data/spec/samples/collisions/page3.md +2 -2
  57. data/spec/samples/files/index.md +1 -1
  58. data/spec/samples/glossary/Glossary.txt +4 -4
  59. data/spec/samples/glossary/Some Page.md +2 -2
  60. data/spec/samples/glossary/_glossary/Simple Term.md +2 -2
  61. data/spec/samples/glossary/_glossary/complex.haml +8 -8
  62. data/spec/samples/glossary/_glossary/project_x.md +3 -3
  63. data/spec/samples/hierarchy/1/1.1/1.1.1/index.haml +1 -1
  64. data/spec/samples/hierarchy/1/1.1/1.1.1/page.haml +3 -3
  65. data/spec/samples/hierarchy/1/1.1/page.haml +3 -3
  66. data/spec/samples/hierarchy/1/page.haml +3 -3
  67. data/spec/samples/hierarchy/2/2.1/2.1.1/page.haml +3 -3
  68. data/spec/samples/hierarchy/2/2.1/index.haml +1 -1
  69. data/spec/samples/hierarchy/2/2.1/page.haml +3 -3
  70. data/spec/samples/hierarchy/2/page.haml +3 -3
  71. data/spec/samples/hierarchy/main.haml +1 -1
  72. data/spec/samples/hierarchy/toc.md +1 -1
  73. data/spec/samples/links/index.txt +11 -11
  74. data/spec/samples/links/root.md +13 -13
  75. data/spec/samples/links/sub1/inner1.md +11 -11
  76. data/spec/samples/links/sub2.md +4 -4
  77. data/spec/samples/links/sub2/inner2.md +7 -7
  78. data/spec/samples/simplest/HTML.html +9 -9
  79. data/spec/samples/simplest/Haml.haml +12 -12
  80. data/spec/samples/simplest/Markdown.md +9 -9
  81. data/spec/samples/simplest/Text.txt +9 -9
  82. data/spec/samples/simplest/Textile.textile +9 -9
  83. data/spec/samples/templates/_templates/doubler.haml +6 -6
  84. data/spec/samples/templates/_templates/page.haml +1 -1
  85. data/spec/samples/templates/goaway.txt +2 -2
  86. data/spec/samples/templates/onepara_html.html +2 -2
  87. data/spec/samples/templates/onepara_md.md +4 -4
  88. data/spec/samples/templates/twopara_haml.haml +6 -6
  89. data/spec/samples/templates/twopara_textile.textile +5 -5
  90. data/spec/samples/titles/3_renamed.txt +1 -1
  91. data/spec/samples/titles/index.txt +1 -1
  92. data/spec/templates.rb +43 -43
  93. data/spec/toc.rb +128 -128
  94. data/spec/writer/chm.rb +2 -2
  95. data/spec/writer/html.rb +2 -2
  96. metadata +56 -25
  97. data/bin/docubot.bat +0 -1
@@ -1,43 +1,43 @@
1
- title: Jiggly Awesome
2
- keywords: explicit, metasection, attributes/specifying
3
- no-index: headings, definitions
4
- auto-section:false
5
- toc: #h1, #h1-1, #div
6
- auto-id : true
7
- +++
8
- %h2#h1 Heading 1
9
- %p#p1-1 Paragraph Number 1.1
10
- %p#p1-2 Paragraph Number 1.2
11
- %ul
12
- %li A list of items
13
- %li A list of items
14
- %li A list of items
15
-
16
- %h3#h1-1 Heading 1.1
17
- %p#p1-1-1 Paragraph Number 1.1.1
18
-
19
- %h2#h2 Heading 2
20
- %h3#h2-1 Heading 2.1
21
- %h4#h2-1-1 Heading 2.1.1
22
- %h5#h2-1-1-1 Heading 2.1.1.1
23
- %p#p2-1-1-1-1 Paragraph Number 2.1.1.1.1
24
-
25
- %h3#h2-2 Heading 2.2
26
- %p#p2-2-1 Paragraph Number 2.2.1
27
- %dl
28
- %dt#dt1 Giggity
29
- %dd#dd1 Quagmire
30
- %dt#dt2 Zanzibar
31
- %dd#dd2 The Best
32
-
33
- %p#p2-2-2 Paragraph Number 2.2.2
34
-
35
- %h1#h0 Heading 0
36
- %p#p0-1
37
- Paragraph 0.1
38
- Whoa, this heading is larger than any other before it!
39
-
40
- #div
41
- Text content
42
- %b is
1
+ title: Jiggly Awesome
2
+ keywords: explicit, metasection, attributes/specifying
3
+ no-index: headings, definitions
4
+ auto-section:false
5
+ toc: #h1, #h1-1, #div
6
+ auto-id : true
7
+ +++
8
+ %h2#h1 Heading 1
9
+ %p#p1-1 Paragraph Number 1.1
10
+ %p#p1-2 Paragraph Number 1.2
11
+ %ul
12
+ %li A list of items
13
+ %li A list of items
14
+ %li A list of items
15
+
16
+ %h3#h1-1 Heading 1.1
17
+ %p#p1-1-1 Paragraph Number 1.1.1
18
+
19
+ %h2#h2 Heading 2
20
+ %h3#h2-1 Heading 2.1
21
+ %h4#h2-1-1 Heading 2.1.1
22
+ %h5#h2-1-1-1 Heading 2.1.1.1
23
+ %p#p2-1-1-1-1 Paragraph Number 2.1.1.1.1
24
+
25
+ %h3#h2-2 Heading 2.2
26
+ %p#p2-2-1 Paragraph Number 2.2.1
27
+ %dl
28
+ %dt#dt1 Giggity
29
+ %dd#dd1 Quagmire
30
+ %dt#dt2 Zanzibar
31
+ %dd#dd2 The Best
32
+
33
+ %p#p2-2-2 Paragraph Number 2.2.2
34
+
35
+ %h1#h0 Heading 0
36
+ %p#p0-1
37
+ Paragraph 0.1
38
+ Whoa, this heading is larger than any other before it!
39
+
40
+ #div
41
+ Text content
42
+ %b is
43
43
  cool.
@@ -1,42 +1,42 @@
1
- title: Combo the Other
2
- keywords: explicit, metasection, attributes/specifying
3
- no-index: headings
4
- auto-section:true
5
- toc: Heading 1, #h1-1, Giggity, #h0
6
- +++
7
- %h2#h1 Heading 1
8
- %p#p1-1 Paragraph Number 1.1
9
- %p#p1-2 Paragraph Number 1.2
10
- %ul
11
- %li A list of items
12
- %li A list of items
13
- %li A list of items
14
-
15
- %h3#h1-1 Heading 1.1
16
- %p#p1-1-1 Paragraph Number 1.1.1
17
-
18
- %h2#h2 Heading 2
19
- %h3#h2-1 Heading 2.1
20
- %h4#h2-1-1 Heading 2.1.1
21
- %h5#h2-1-1-1 Heading 2.1.1.1
22
- %p#p2-1-1-1-1 Paragraph Number 2.1.1.1.1
23
-
24
- %h3#h2-2 Heading 2.2
25
- %p#p2-2-1 Paragraph Number 2.2.1
26
- %dl
27
- %dt Giggity
28
- %dd#dd1 Quagmire
29
- %dt#dt2 Zanzibar
30
- %dd#dd2 The Best
31
-
32
- %p#p2-2-2 Paragraph Number 2.2.2
33
-
34
- %h1#h0 Heading 0
35
- %p#p0-1
36
- Paragraph 0.1
37
- Whoa, this heading is larger than any other before it!
38
-
39
- #div
40
- Text content
41
- %b is
1
+ title: Combo the Other
2
+ keywords: explicit, metasection, attributes/specifying
3
+ no-index: headings
4
+ auto-section:true
5
+ toc: Heading 1, #h1-1, Giggity, #h0
6
+ +++
7
+ %h2#h1 Heading 1
8
+ %p#p1-1 Paragraph Number 1.1
9
+ %p#p1-2 Paragraph Number 1.2
10
+ %ul
11
+ %li A list of items
12
+ %li A list of items
13
+ %li A list of items
14
+
15
+ %h3#h1-1 Heading 1.1
16
+ %p#p1-1-1 Paragraph Number 1.1.1
17
+
18
+ %h2#h2 Heading 2
19
+ %h3#h2-1 Heading 2.1
20
+ %h4#h2-1-1 Heading 2.1.1
21
+ %h5#h2-1-1-1 Heading 2.1.1.1
22
+ %p#p2-1-1-1-1 Paragraph Number 2.1.1.1.1
23
+
24
+ %h3#h2-2 Heading 2.2
25
+ %p#p2-2-1 Paragraph Number 2.2.1
26
+ %dl
27
+ %dt Giggity
28
+ %dd#dd1 Quagmire
29
+ %dt#dt2 Zanzibar
30
+ %dd#dd2 The Best
31
+
32
+ %p#p2-2-2 Paragraph Number 2.2.2
33
+
34
+ %h1#h0 Heading 0
35
+ %p#p0-1
36
+ Paragraph 0.1
37
+ Whoa, this heading is larger than any other before it!
38
+
39
+ #div
40
+ Text content
41
+ %b is
42
42
  cool.
@@ -1,40 +1,40 @@
1
- auto-id: true
2
- hide: true
3
- toc: Heading 1, Heading 2
4
- +++
5
- %h2 Heading 1
6
- %p Paragraph Number 1.1
7
- %p Paragraph Number 1.2
8
- %ul
9
- %li A list of items
10
- %li A list of items
11
- %li A list of items
12
-
13
- %h3 Heading 1.1
14
- %p Paragraph Number 1.1.1
15
-
16
- %h2 Heading 2
17
- %h3 Heading 2.1
18
- %h4 Heading 2.1.1
19
- %h5 Heading 2.1.1.1
20
- %p Paragraph Number 2.1.1.1.1
21
-
22
- %h3 Heading 2.2
23
- %p Paragraph Number 2.2.1
24
- %dl
25
- %dt#dt1 Giggity
26
- %dd#dd1 Quagmire
27
- %dt Zanzibar
28
- %dd The Best
29
-
30
- %p Paragraph Number 2.2.2
31
-
32
- %h1 Heading 0
33
- %p
34
- Paragraph 0.1
35
- Whoa, this heading is larger than any other before it!
36
-
37
- #div
38
- Text content
39
- %b is
1
+ auto-id: true
2
+ hide: true
3
+ toc: Heading 1, Heading 2
4
+ +++
5
+ %h2 Heading 1
6
+ %p Paragraph Number 1.1
7
+ %p Paragraph Number 1.2
8
+ %ul
9
+ %li A list of items
10
+ %li A list of items
11
+ %li A list of items
12
+
13
+ %h3 Heading 1.1
14
+ %p Paragraph Number 1.1.1
15
+
16
+ %h2 Heading 2
17
+ %h3 Heading 2.1
18
+ %h4 Heading 2.1.1
19
+ %h5 Heading 2.1.1.1
20
+ %p Paragraph Number 2.1.1.1.1
21
+
22
+ %h3 Heading 2.2
23
+ %p Paragraph Number 2.2.1
24
+ %dl
25
+ %dt#dt1 Giggity
26
+ %dd#dd1 Quagmire
27
+ %dt Zanzibar
28
+ %dd The Best
29
+
30
+ %p Paragraph Number 2.2.2
31
+
32
+ %h1 Heading 0
33
+ %p
34
+ Paragraph 0.1
35
+ Whoa, this heading is larger than any other before it!
36
+
37
+ #div
38
+ Text content
39
+ %b is
40
40
  cool.
@@ -1,8 +1,8 @@
1
- title : Friggles® The Cat, ©2009
2
- author :Gavin Kistner
3
- default: All About Mr. Friggles
4
- quotes:"It's all about Mr. Benjamin", "I have never seen this cat before in my life!"
5
- author.email : !@phrogz.net
6
- author website :http://phrogz.net
7
- awesome : true
8
- +++
1
+ title : Friggles® The Cat, ©2009
2
+ author :Gavin Kistner
3
+ default: All About Mr. Friggles
4
+ quotes:"It's all about Mr. Benjamin", "I have never seen this cat before in my life!"
5
+ author.email : !@phrogz.net
6
+ author website :http://phrogz.net
7
+ awesome : true
8
+ +++
@@ -1,3 +1,3 @@
1
- title: Page 1 (from Markdown)
2
- +++
1
+ title: Page 1 (from Markdown)
2
+ +++
3
3
  This will collide with Page 1 (from Textile)
@@ -1,3 +1,3 @@
1
- title: Page 1 (from Textile)
2
- +++
1
+ title: Page 1 (from Textile)
2
+ +++
3
3
  This will collide with Page 1 (from Markdown)
@@ -1,4 +1,4 @@
1
- title: Page 2 (from haml)
2
- +++
3
- %p
1
+ title: Page 2 (from haml)
2
+ +++
3
+ %p
4
4
  This will collide with Page 2 (from html) and Page 2 (from text)
@@ -1,3 +1,3 @@
1
- title: Page 2 (from html)
2
- +++
1
+ title: Page 2 (from html)
2
+ +++
3
3
  <p>This will collide with Page 2 (from text) and Page 2 (from haml).</p>
@@ -1,3 +1,3 @@
1
- title: Page 2 (from text)
2
- +++
1
+ title: Page 2 (from text)
2
+ +++
3
3
  This will collide with Page 2 (from html) and Page 2 (from haml)
@@ -1,3 +1,3 @@
1
- title: Page 3
2
- +++
1
+ title: Page 3
2
+ +++
3
3
  This won't collide with page3.bin
@@ -1,2 +1,2 @@
1
- ignore: **/*.psd, **/*.ai, **/Thumbs.db, BUILDING.txt
1
+ ignore: **/*.psd, **/*.ai, **/Thumbs.db, BUILDING.txt
2
2
  +++
@@ -1,5 +1,5 @@
1
- template: glossary
2
- +++
3
- The `glossary.haml` template writes out the glossary contents.
4
- This page tells it where to be generated and how to be named.
1
+ template: glossary
2
+ +++
3
+ The `glossary.haml` template writes out the glossary contents.
4
+ This page tells it where to be generated and how to be named.
5
5
  The contents of this page are ignored by the `glossary.haml` template.
@@ -1,3 +1,3 @@
1
- This page mentions both a $$simple term$$ and a $$more complex term:complex term$$.
2
-
1
+ This page mentions both a $$simple term$$ and a $$more complex term:complex term$$.
2
+
3
3
  It also mentions a $$crazy term$$, which is never defined.
@@ -1,3 +1,3 @@
1
- This is a simple term.
2
-
1
+ This is a simple term.
2
+
3
3
  It is defined in two paragraphs.
@@ -1,8 +1,8 @@
1
- title: Complex Term
2
- todo : Document why this is complex.
3
- +++
4
- - 3.times do |i|
5
- %p
6
- This is a complex term.
7
- It is described in three paragraphs.
8
- This is paragraph ##{i+1}.
1
+ title: Complex Term
2
+ todo : Document why this is complex.
3
+ +++
4
+ - 3.times do |i|
5
+ %p
6
+ This is a complex term.
7
+ It is described in three paragraphs.
8
+ This is paragraph ##{i+1}.
@@ -1,4 +1,4 @@
1
- title: Secret Term
2
- hide : true
3
- +++
1
+ title: Secret Term
2
+ hide : true
3
+ +++
4
4
  This must not be shown until the aliens have revealed themselves to the public.
@@ -1 +1 @@
1
- %a(href="#{root}main.css") Linked
1
+ %a(href="#{root}main.css") Linked
@@ -1,3 +1,3 @@
1
- title:1.1.1p
2
- +++
3
- %a(href="#{root}main.css") Linked
1
+ title:1.1.1p
2
+ +++
3
+ %a(href="#{root}main.css") Linked
@@ -1,3 +1,3 @@
1
- title:1.1p
2
- +++
3
- %a(href="#{root}main.css") Linked
1
+ title:1.1p
2
+ +++
3
+ %a(href="#{root}main.css") Linked
@@ -1,3 +1,3 @@
1
- title:1p
2
- +++
3
- %a(href="#{root}main.css") Linked
1
+ title:1p
2
+ +++
3
+ %a(href="#{root}main.css") Linked
@@ -1,3 +1,3 @@
1
- title: 2.1.1p
2
- +++
3
- %a(href="#{root}main.css") Linked
1
+ title: 2.1.1p
2
+ +++
3
+ %a(href="#{root}main.css") Linked
@@ -1 +1 @@
1
- %a(href="#{root}main.css") Linked
1
+ %a(href="#{root}main.css") Linked
@@ -1,3 +1,3 @@
1
- title: 2.1p
2
- +++
3
- %a(href="#{root}main.css") Linked
1
+ title: 2.1p
2
+ +++
3
+ %a(href="#{root}main.css") Linked
@@ -1,3 +1,3 @@
1
- title:2p
2
- +++
3
- %a(href="#{root}main.css") Linked
1
+ title:2p
2
+ +++
3
+ %a(href="#{root}main.css") Linked
@@ -1 +1 @@
1
- %a(href="#{root}main.css") Linked
1
+ %a(href="#{root}main.css") Linked
@@ -1,2 +1,2 @@
1
- template: toc
1
+ template: toc
2
2
  +++
@@ -1,11 +1,11 @@
1
- The global root of the site is not a valid link.
2
-
3
- | external | valid | file | broken |
4
- -----------------+----------+-------+------+--------+
5
- | root.md | 1 | 6 | 0 | 5 |
6
- | sub1/inner1.md | 1 | 5 | 1 | 4 |
7
- | sub2/inner2.md | 1 | 2 | 1 | 3 |
8
- | sub2.md | 1 | 0 | 1 | 1 |
9
- -----------------+----------+-------+------+--------+
10
- TOTALS | 4 | 13 | 3 | 13 |
11
- +----------+-------+------+--------+
1
+ The global root of the site is not a valid link.
2
+
3
+ | external | valid | file | broken |
4
+ -----------------+----------+-------+------+--------+
5
+ | root.md | 1 | 6 | 0 | 5 |
6
+ | sub1/inner1.md | 1 | 5 | 1 | 4 |
7
+ | sub2/inner2.md | 1 | 2 | 1 | 3 |
8
+ | sub2.md | 1 | 0 | 1 | 1 |
9
+ -----------------+----------+-------+------+--------+
10
+ TOTALS | 4 | 13 | 3 | 13 |
11
+ +----------+-------+------+--------+