docgenerator 0.1.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (152) hide show
  1. data/examples/docgenerator_example.rb +76 -160
  2. data/examples/docgenerator_example_footnote.rb +98 -0
  3. data/examples/docgenerator_example_list.rb +62 -0
  4. data/examples/docgenerator_example_restrictions.rb +59 -0
  5. data/examples/docgenerator_example_tabular.rb +68 -0
  6. data/examples/docgenerator_example_tripfalls.rb +57 -0
  7. data/examples/wiki2docgenerator_example.rb +270 -0
  8. data/lib/docgenerator.rb +159 -0
  9. data/{docgenerator_attribute.rb → lib/docgenerator_attribute.rb} +32 -7
  10. data/{docgenerator_characters.rb → lib/docgenerator_characters.rb} +15 -0
  11. data/{docgenerator_css.rb → lib/docgenerator_css.rb} +6 -1
  12. data/{docgenerator_document.rb → lib/docgenerator_document.rb} +92 -93
  13. data/{docgenerator_element.rb → lib/docgenerator_element.rb} +125 -51
  14. data/{docgenerator_elements.rb → lib/docgenerator_elements.rb} +40 -56
  15. data/{docgenerator_environments.rb → lib/docgenerator_environments.rb} +16 -10
  16. data/{docgenerator_footnote.rb → lib/docgenerator_footnote.rb} +44 -22
  17. data/{docgenerator_lists.rb → lib/docgenerator_lists.rb} +44 -39
  18. data/{docgenerator_sections.rb → lib/docgenerator_sections.rb} +2 -2
  19. data/{docgenerator_tabular.rb → lib/docgenerator_tabular.rb} +71 -39
  20. data/{packages → lib/packages}/docgenerator_attachfile.rb +0 -0
  21. data/{packages → lib/packages}/docgenerator_caption.rb +0 -0
  22. data/{packages → lib/packages}/docgenerator_hyperref.rb +0 -0
  23. data/{packages → lib/packages}/docgenerator_listings.rb +1 -2
  24. data/{packages → lib/packages}/docgenerator_pdfpages.rb +0 -0
  25. data/{packages → lib/packages}/docgenerator_scrlettr2.rb +2 -2
  26. data/{packages → lib/packages}/docgenerator_scrpage2.rb +0 -0
  27. data/{packages → lib/packages}/docgenerator_url.rb +0 -0
  28. data/lib/templates/docgenerator_template.rb +176 -0
  29. data/lib/templates/docgenerator_template.yaml +105 -0
  30. data/lib/wiki2doc/wiki2docgenerator.rb +1161 -0
  31. data/self_docgenerator.rb +161 -0
  32. data/unittest/expected/test_beamer_note.html +1 -0
  33. data/unittest/expected/test_beamer_note.latex +1 -0
  34. data/unittest/expected/test_beamer_note.text +1 -0
  35. data/unittest/expected/test_beamer_note.wiki +1 -0
  36. data/unittest/expected/test_block.html +1 -0
  37. data/unittest/expected/test_block.latex +1 -0
  38. data/unittest/expected/test_block.text +1 -0
  39. data/unittest/expected/test_block.wiki +2 -0
  40. data/unittest/expected/test_css.css +1 -0
  41. data/unittest/expected/test_css2.css +1 -0
  42. data/unittest/expected/test_description.html +1 -0
  43. data/unittest/expected/test_description.latex +3 -0
  44. data/unittest/expected/test_description.text +3 -0
  45. data/unittest/expected/test_description.wiki +3 -0
  46. data/unittest/expected/test_document_article.latex +23 -0
  47. data/unittest/expected/test_document_html.html +14 -0
  48. data/unittest/expected/test_document_replacement_article.latex +23 -0
  49. data/unittest/expected/test_document_replacement_html.html +14 -0
  50. data/unittest/expected/test_document_replacement_text.text +5 -0
  51. data/unittest/expected/test_document_replacement_wiki.wiki +5 -0
  52. data/unittest/expected/test_document_text.text +5 -0
  53. data/unittest/expected/test_document_wiki.wiki +5 -0
  54. data/unittest/expected/test_enumerate.html +1 -0
  55. data/unittest/expected/test_enumerate.latex +3 -0
  56. data/unittest/expected/test_enumerate.text +1 -0
  57. data/unittest/expected/test_enumerate.wiki +2 -0
  58. data/unittest/expected/test_footnote.html +5 -0
  59. data/unittest/expected/test_footnote.latex +11 -0
  60. data/unittest/expected/test_footnote.text +13 -0
  61. data/unittest/expected/test_footnote.wiki +11 -0
  62. data/unittest/expected/test_footnote_group.html +8 -0
  63. data/unittest/expected/test_footnote_group.latex +17 -0
  64. data/unittest/expected/test_footnote_group.wiki +17 -0
  65. data/unittest/expected/test_href.html +2 -0
  66. data/unittest/expected/test_href.latex +8 -0
  67. data/unittest/expected/test_href.text +4 -0
  68. data/unittest/expected/test_html_css.html +1 -0
  69. data/unittest/expected/test_itemize.html +1 -0
  70. data/unittest/expected/test_itemize.latex +3 -0
  71. data/unittest/expected/test_itemize.text +1 -0
  72. data/unittest/expected/test_itemize.wiki +2 -0
  73. data/unittest/expected/test_section.html +8 -0
  74. data/unittest/expected/test_section.latex +20 -0
  75. data/unittest/expected/test_section.text +24 -0
  76. data/unittest/expected/test_section.wiki +20 -0
  77. data/unittest/expected/test_tabular.html +10 -0
  78. data/unittest/expected/test_tabular.latex +10 -0
  79. data/unittest/expected/test_tabular.wiki +31 -0
  80. data/unittest/expected/test_tabular_doc.latex +22 -0
  81. data/unittest/expected/test_wiki.html +6 -0
  82. data/unittest/expected/test_wiki.latex +12 -0
  83. data/unittest/expected/test_wiki.text +14 -0
  84. data/unittest/expected/test_wiki.wiki +12 -0
  85. data/unittest/expected/test_wiki_amazon.html +10 -0
  86. data/unittest/expected/test_wiki_description.html +7 -0
  87. data/unittest/expected/test_wiki_description.latex +11 -0
  88. data/unittest/expected/test_wiki_description.text +6 -0
  89. data/unittest/expected/test_wiki_description.wiki +6 -0
  90. data/unittest/expected/test_wiki_footnote.html +8 -0
  91. data/unittest/expected/test_wiki_footnote.latex +15 -0
  92. data/unittest/expected/test_wiki_footnote.text +12 -0
  93. data/unittest/expected/test_wiki_footnote.wiki +12 -0
  94. data/unittest/expected/test_wiki_footnote_groupid.html +21 -0
  95. data/unittest/expected/test_wiki_html_code.html +7 -0
  96. data/unittest/expected/test_wiki_html_code.latex +10 -0
  97. data/unittest/expected/test_wiki_html_code.text +6 -0
  98. data/unittest/expected/test_wiki_html_code.wiki +6 -0
  99. data/unittest/expected/test_wiki_inline.html +6 -0
  100. data/unittest/expected/test_wiki_inline.latex +12 -0
  101. data/unittest/expected/test_wiki_inline.text +8 -0
  102. data/unittest/expected/test_wiki_inline.wiki +8 -0
  103. data/unittest/expected/test_wiki_label.html +6 -0
  104. data/unittest/expected/test_wiki_link.html +8 -0
  105. data/unittest/expected/test_wiki_link.latex +14 -0
  106. data/unittest/expected/test_wiki_link.log +3 -0
  107. data/unittest/expected/test_wiki_link.wiki +6 -0
  108. data/unittest/expected/test_wiki_list_ol.html +24 -0
  109. data/unittest/expected/test_wiki_list_ol.latex +30 -0
  110. data/unittest/expected/test_wiki_list_ol.text +10 -0
  111. data/unittest/expected/test_wiki_list_ol.wiki +12 -0
  112. data/unittest/expected/test_wiki_list_ol_after_ul.html +16 -0
  113. data/unittest/expected/test_wiki_list_ol_after_ul.latex +24 -0
  114. data/unittest/expected/test_wiki_list_ol_after_ul.text +8 -0
  115. data/unittest/expected/test_wiki_list_ol_after_ul.wiki +10 -0
  116. data/unittest/expected/test_wiki_list_ol_ul.html +24 -0
  117. data/unittest/expected/test_wiki_list_ol_ul.latex +30 -0
  118. data/unittest/expected/test_wiki_list_ol_ul.text +10 -0
  119. data/unittest/expected/test_wiki_list_ol_ul.wiki +12 -0
  120. data/unittest/expected/test_wiki_list_ul.html +24 -0
  121. data/unittest/expected/test_wiki_list_ul.latex +30 -0
  122. data/unittest/expected/test_wiki_list_ul.text +10 -0
  123. data/unittest/expected/test_wiki_list_ul.wiki +12 -0
  124. data/unittest/expected/test_wiki_list_ul_too_much.html +39 -0
  125. data/unittest/expected/test_wiki_list_ul_too_much.latex +51 -0
  126. data/unittest/expected/test_wiki_list_ul_too_much.text +11 -0
  127. data/unittest/expected/test_wiki_list_ul_too_much.wiki +15 -0
  128. data/unittest/expected/test_wiki_picture.html +55 -0
  129. data/unittest/expected/test_wiki_picture.latex +76 -0
  130. data/unittest/expected/test_wiki_picture_thumb.html +5 -0
  131. data/unittest/expected/test_wiki_tab1.html +30 -0
  132. data/unittest/expected/test_wiki_tab1.latex +30 -0
  133. data/unittest/expected/test_wiki_tab1.wiki +29 -0
  134. data/unittest/expected/test_wiki_textformatting.html +7 -0
  135. data/unittest/expected/test_wiki_textformatting.latex +16 -0
  136. data/unittest/expected/test_wiki_textformatting.text +11 -0
  137. data/unittest/expected/test_wiki_textformatting.wiki +9 -0
  138. data/unittest/expected/test_wiki_toc.html +9 -0
  139. data/unittest/expected/test_wiki_toc.latex +18 -0
  140. data/unittest/expected/test_wiki_toc.text +21 -0
  141. data/unittest/expected/test_wiki_toc.wiki +18 -0
  142. data/unittest/expected/test_wiki_ul_multiple_line.html +18 -0
  143. data/unittest/expected/test_wiki_ul_multiple_line.latex +19 -0
  144. data/unittest/expected/test_wiki_ul_multiple_line.text +6 -0
  145. data/unittest/expected/test_wiki_ul_multiple_line.wiki +7 -0
  146. data/unittest/test_docgenerator.rb +85 -0
  147. data/unittest/unittest_docgenerator.rb +454 -0
  148. data/unittest/unittest_wiki2doc.rb +451 -0
  149. metadata +155 -31
  150. data/docgenerator.rb +0 -137
  151. data/docgenerator_template.rb +0 -103
  152. data/packages/docgenerator_beamer.rb +0 -250
@@ -0,0 +1,11 @@
1
+
2
+ Text before
3
+
4
+ - Listentry 1
5
+ - Listentry 2- Listentry 2.1
6
+ - Listentry 2.2- Listentry 2.2.1- Listentry 2.2.1.1- Listentry 2.2.1.1.1
7
+
8
+ - Listentry 3
9
+
10
+ Text afterwords
11
+
@@ -0,0 +1,15 @@
1
+
2
+ Text before
3
+
4
+
5
+ * Listentry 1
6
+ * Listentry 2
7
+ * Listentry 2.1
8
+ * Listentry 2.2
9
+ * Listentry 2.2.1
10
+ * Listentry 2.2.1.1
11
+ * Listentry 2.2.1.1.1
12
+ * Listentry 3
13
+
14
+ Text afterwords
15
+
@@ -0,0 +1,55 @@
1
+ <p ><span >
2
+ <img src = "test.jpg" />
3
+ </span>
4
+
5
+ </p>
6
+ <p ><span >
7
+ <img src = "test.jpg" alt = "description" />
8
+ </span>
9
+
10
+ <span >
11
+ vorher<img src = "test.jpg" alt = "description" /><br clear = "all" />
12
+ </span>
13
+
14
+ <span >
15
+ <img src = "test.jpg" alt = "description" /><br clear = "all" />
16
+ nachher
17
+ </span>
18
+
19
+ </p>
20
+ <p ><span >
21
+ <a href = "http://ruby.lickert.net" ><img src = "test.jpg" /></a>
22
+ </span>
23
+
24
+ <span >
25
+ <a href = "http://ruby.lickert.net" ><img src = "test.jpg" alt = "test" /></a>
26
+ </span>
27
+
28
+ </p>
29
+ <p ><span style = "float: right" >
30
+ <img src = "test.jpg" />
31
+ </span>
32
+
33
+ <span style = "float: left" >
34
+ <img src = "test.jpg" />
35
+ </span>
36
+
37
+ </p>
38
+ <p ><span >
39
+ <img src = "test.jpg" style = "width: 123px" />
40
+ </span>
41
+
42
+ </p>
43
+ <p ><span >
44
+ <img src = "test.jpg" class = "pictureclass" />
45
+ </span>
46
+
47
+ <span >
48
+ <img src = "test.jpg" class = "imgclass" />
49
+ </span>
50
+
51
+ <span class = "imgclass" >
52
+ <img src = "test.jpg" />
53
+ </span>
54
+
55
+ </p>
@@ -0,0 +1,76 @@
1
+
2
+
3
+ \bgroup
4
+ \includegraphics[]{test.jpg}
5
+ \egroup
6
+
7
+
8
+
9
+
10
+
11
+ \bgroup
12
+ \includegraphics[]{test.jpg}
13
+ \egroup
14
+
15
+ \bgroup
16
+ vorher\includegraphics[]{test.jpg}\newline
17
+
18
+ \egroup
19
+
20
+ \bgroup
21
+ \includegraphics[]{test.jpg}\newline
22
+ nachher
23
+ \egroup
24
+
25
+
26
+
27
+
28
+
29
+ \bgroup
30
+ \href{http://ruby.lickert.net}{\includegraphics[]{test.jpg}}
31
+
32
+ \egroup
33
+
34
+ \bgroup
35
+ \href{http://ruby.lickert.net}{\includegraphics[]{test.jpg}}
36
+
37
+ \egroup
38
+
39
+
40
+
41
+
42
+
43
+ \bgroup
44
+ \includegraphics[]{test.jpg}
45
+ \egroup
46
+
47
+ \bgroup
48
+ \includegraphics[]{test.jpg}
49
+ \egroup
50
+
51
+
52
+
53
+
54
+
55
+ \bgroup
56
+ \includegraphics[width={123px}]{test.jpg}
57
+ \egroup
58
+
59
+
60
+
61
+
62
+
63
+ \bgroup
64
+ \includegraphics[]{test.jpg}
65
+ \egroup
66
+
67
+ \bgroup
68
+ \includegraphics[]{test.jpg}
69
+ \egroup
70
+
71
+ \bgroup
72
+ \includegraphics[]{test.jpg}
73
+ \egroup
74
+
75
+
76
+
@@ -0,0 +1,5 @@
1
+ <p ><span >
2
+ <a href = "test.jpg" ><img src = "testthumb.jpg" /></a>
3
+ </span>
4
+
5
+ </p>
@@ -0,0 +1,30 @@
1
+
2
+ <table >
3
+ <tr ><td colspan = "4" >Titel</td>
4
+ </tr>
5
+ <tr ><td >1A</td>
6
+ <td >1B</td>
7
+ <td >1C</td>
8
+ <td >1D</td>
9
+ </tr>
10
+ <tr ><td >2A</td>
11
+ <td >2B</td>
12
+ <td >2C</td>
13
+ <td >2D</td>
14
+ </tr>
15
+ <tr ><td >3A</td>
16
+ <td >3B</td>
17
+ <td >3C</td>
18
+ <td >3D</td>
19
+ </tr>
20
+ <tr ><td >4A</td>
21
+ <td >4B</td>
22
+ <td >4C</td>
23
+ <td >4D</td>
24
+ </tr>
25
+ <tr ><td >5A</td>
26
+ <td >5B</td>
27
+ <td >5C</td>
28
+ <td >5D</td>
29
+ </tr>
30
+ </table>
@@ -0,0 +1,30 @@
1
+
2
+ \begin{tabular}{cccc}
3
+ \multicolumn{4}{c}{Titel}
4
+ \\
5
+ 1A
6
+ & 1B
7
+ & 1C
8
+ & 1D
9
+ \\
10
+ 2A
11
+ & 2B
12
+ & 2C
13
+ & 2D
14
+ \\
15
+ 3A
16
+ & 3B
17
+ & 3C
18
+ & 3D
19
+ \\
20
+ 4A
21
+ & 4B
22
+ & 4C
23
+ & 4D
24
+ \\
25
+ 5A
26
+ & 5B
27
+ & 5C
28
+ & 5D
29
+ \\
30
+ \end{tabular}
@@ -0,0 +1,29 @@
1
+ {|
2
+ |-
3
+ |columns=4|pos=c||Titel
4
+ |-
5
+ |1A
6
+ |1B
7
+ |1C
8
+ |1D
9
+ |-
10
+ |2A
11
+ |2B
12
+ |2C
13
+ |2D
14
+ |-
15
+ |3A
16
+ |3B
17
+ |3C
18
+ |3D
19
+ |-
20
+ |4A
21
+ |4B
22
+ |4C
23
+ |4D
24
+ |-
25
+ |5A
26
+ |5B
27
+ |5C
28
+ |5D
29
+ |}
@@ -0,0 +1,7 @@
1
+ <p >vorher<br />Nachher
2
+ </p>
3
+ <p >vorher<br clear = "all" />Nachher
4
+ </p>
5
+ <hr />
6
+ <p >Nach einer Trennlinie
7
+ </p>
@@ -0,0 +1,16 @@
1
+
2
+
3
+ vorher\newline Nachher
4
+
5
+
6
+
7
+
8
+ vorher\newline Nachher
9
+
10
+
11
+ \hrulefill
12
+
13
+
14
+ Nach einer Trennlinie
15
+
16
+
@@ -0,0 +1,11 @@
1
+
2
+ vorher
3
+ Nachher
4
+
5
+
6
+ vorher
7
+ Nachher
8
+
9
+ -------------------------
10
+ Nach einer Trennlinie
11
+
@@ -0,0 +1,9 @@
1
+
2
+ vorher{{newline}}Nachher
3
+
4
+
5
+ vorher{{newline}}Nachher
6
+
7
+ ----
8
+ Nach einer Trennlinie
9
+
@@ -0,0 +1,9 @@
1
+ <h1 >Titel 1</h1>
2
+ <p >Text
3
+ </p>
4
+ <h2 >Titel 2</h2>
5
+ <p >Text unter Titel 2
6
+ </p>
7
+ <h2 id = "2b" >Titel 2b</h2>
8
+ <p >Text unter Titel 2b
9
+ </p>
@@ -0,0 +1,18 @@
1
+ \section{Titel 1}
2
+
3
+
4
+ Text
5
+
6
+
7
+ \subsection{Titel 2}
8
+
9
+
10
+ Text unter Titel 2
11
+
12
+
13
+ \subsection{Titel 2b}\hypertarget{2b}{}
14
+
15
+
16
+ Text unter Titel 2b
17
+
18
+
@@ -0,0 +1,21 @@
1
+
2
+ Titel 1
3
+ ------------------------------
4
+
5
+
6
+ Text
7
+
8
+
9
+ Titel 2
10
+ ------------------------------
11
+
12
+
13
+ Text unter Titel 2
14
+
15
+
16
+ Titel 2b
17
+ ------------------------------
18
+
19
+
20
+ Text unter Titel 2b
21
+
@@ -0,0 +1,18 @@
1
+
2
+ ==Titel 1==
3
+
4
+
5
+ Text
6
+
7
+
8
+ ===Titel 2===
9
+
10
+
11
+ Text unter Titel 2
12
+
13
+
14
+ ===Titel 2b===
15
+
16
+
17
+ Text unter Titel 2b
18
+
@@ -0,0 +1,18 @@
1
+
2
+ <ul >
3
+ <li >
4
+ vorher
5
+ </li>
6
+ <li >
7
+ text mehr text zum item
8
+ </li>
9
+ <li >
10
+ nachher und vorher
11
+ </li>
12
+ <li >
13
+ text mehr text zum item<p >neuer Absatz im Item funktioniert auch.</p>
14
+ </li>
15
+ <li >
16
+ nachher
17
+ </li>
18
+ </ul>
@@ -0,0 +1,19 @@
1
+
2
+
3
+ \begin{itemize}
4
+
5
+ \item vorher
6
+
7
+ \item text mehr text zum item
8
+
9
+ \item nachher und vorher
10
+
11
+ \item text mehr text zum item
12
+
13
+ neuer Absatz im Item funktioniert auch.
14
+
15
+
16
+
17
+ \item nachher
18
+ \end{itemize}
19
+
@@ -0,0 +1,6 @@
1
+ - vorher
2
+ - text mehr text zum item
3
+ - nachher und vorher
4
+ - text mehr text zum item
5
+ neuer Absatz im Item funktioniert auch.
6
+ - nachher
@@ -0,0 +1,7 @@
1
+
2
+ * vorher
3
+ * text mehr text zum item
4
+ * nachher und vorher
5
+ * text mehr text zum item
6
+ neuer Absatz im Item funktioniert auch.
7
+ * nachher