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,6 @@
1
+ <p ><a name="a"></a>
2
+ </p>
3
+ <p >text text
4
+ <a href = "#a" >hier</a>
5
+ <a href = "#a" >hier</a>
6
+ </p>
@@ -0,0 +1,8 @@
1
+ <p >
2
+ <a href = "./unittest_wiki2doc.rb" >link to test</a>
3
+
4
+ </p>
5
+ <p >
6
+ <a href = "./unexisting_file.xx" >link with error</a>
7
+
8
+ </p>
@@ -0,0 +1,14 @@
1
+
2
+
3
+
4
+ \href{./unittest_wiki2doc.rb}{link to test}
5
+
6
+
7
+
8
+
9
+
10
+
11
+ \href{./unexisting_file.xx}{link with error}
12
+
13
+
14
+
@@ -0,0 +1,3 @@
1
+ WARN Wikitext: Link to unexisting local file ././unexisting_file.xx (from C:/usr/Script/DocumentGenerator/unittest)
2
+ WARN Wikitext: Link to unexisting local file ././unexisting_file.xx (from C:/usr/Script/DocumentGenerator/unittest)
3
+ WARN Wikitext: Link to unexisting local file ././unexisting_file.xx (from C:/usr/Script/DocumentGenerator/unittest)
@@ -0,0 +1,6 @@
1
+
2
+ [./unittest_wiki2doc.rb link to test]
3
+
4
+
5
+ [./unexisting_file.xx link with error]
6
+
@@ -0,0 +1,24 @@
1
+ <p >Text before
2
+ </p>
3
+
4
+ <ol >
5
+ <li >
6
+ Listentry 1
7
+ </li>
8
+ <li >
9
+ Listentry 2
10
+ <ol >
11
+ <li >
12
+ Listentry 2.1
13
+ </li>
14
+ <li >
15
+ Listentry 2.2
16
+ </li>
17
+ </ol>
18
+ </li>
19
+ <li >
20
+ Listentry 3
21
+ </li>
22
+ </ol>
23
+ <p >Text afterwords
24
+ </p>
@@ -0,0 +1,30 @@
1
+
2
+
3
+ Text before
4
+
5
+
6
+
7
+
8
+ \begin{enumerate}
9
+
10
+ \item Listentry 1
11
+
12
+ \item Listentry 2
13
+
14
+ \begin{enumerate}
15
+
16
+ \item Listentry 2.1
17
+
18
+ \item Listentry 2.2
19
+ \end{enumerate}
20
+
21
+
22
+
23
+ \item Listentry 3
24
+ \end{enumerate}
25
+
26
+
27
+
28
+ Text afterwords
29
+
30
+
@@ -0,0 +1,10 @@
1
+
2
+ Text before
3
+
4
+ - Listentry 1
5
+ - Listentry 2- Listentry 2.1
6
+ - Listentry 2.2
7
+ - Listentry 3
8
+
9
+ Text afterwords
10
+
@@ -0,0 +1,12 @@
1
+
2
+ Text before
3
+
4
+
5
+ # Listentry 1
6
+ # Listentry 2
7
+ # Listentry 2.1
8
+ # Listentry 2.2
9
+ # Listentry 3
10
+
11
+ Text afterwords
12
+
@@ -0,0 +1,16 @@
1
+ <p >Text before
2
+ </p>
3
+
4
+ <ul >
5
+ <li >
6
+ Listentry 1
7
+ </li>
8
+ </ul>
9
+
10
+ <ol >
11
+ <li >
12
+ Listentry 2
13
+ </li>
14
+ </ol>
15
+ <p >Text afterwords
16
+ </p>
@@ -0,0 +1,24 @@
1
+
2
+
3
+ Text before
4
+
5
+
6
+
7
+
8
+ \begin{itemize}
9
+
10
+ \item Listentry 1
11
+ \end{itemize}
12
+
13
+
14
+
15
+ \begin{enumerate}
16
+
17
+ \item Listentry 2
18
+ \end{enumerate}
19
+
20
+
21
+
22
+ Text afterwords
23
+
24
+
@@ -0,0 +1,8 @@
1
+
2
+ Text before
3
+
4
+ - Listentry 1
5
+ - Listentry 2
6
+
7
+ Text afterwords
8
+
@@ -0,0 +1,10 @@
1
+
2
+ Text before
3
+
4
+
5
+ * Listentry 1
6
+
7
+ # Listentry 2
8
+
9
+ Text afterwords
10
+
@@ -0,0 +1,24 @@
1
+ <p >Text before
2
+ </p>
3
+
4
+ <ol >
5
+ <li >
6
+ Listentry 1
7
+ </li>
8
+ <li >
9
+ Listentry 2
10
+ <ul >
11
+ <li >
12
+ Listentry 2.1
13
+ </li>
14
+ <li >
15
+ Listentry 2.2
16
+ </li>
17
+ </ul>
18
+ </li>
19
+ <li >
20
+ Listentry 3
21
+ </li>
22
+ </ol>
23
+ <p >Text afterwords
24
+ </p>
@@ -0,0 +1,30 @@
1
+
2
+
3
+ Text before
4
+
5
+
6
+
7
+
8
+ \begin{enumerate}
9
+
10
+ \item Listentry 1
11
+
12
+ \item Listentry 2
13
+
14
+ \begin{itemize}
15
+
16
+ \item Listentry 2.1
17
+
18
+ \item Listentry 2.2
19
+ \end{itemize}
20
+
21
+
22
+
23
+ \item Listentry 3
24
+ \end{enumerate}
25
+
26
+
27
+
28
+ Text afterwords
29
+
30
+
@@ -0,0 +1,10 @@
1
+
2
+ Text before
3
+
4
+ - Listentry 1
5
+ - Listentry 2- Listentry 2.1
6
+ - Listentry 2.2
7
+ - Listentry 3
8
+
9
+ Text afterwords
10
+
@@ -0,0 +1,12 @@
1
+
2
+ Text before
3
+
4
+
5
+ # Listentry 1
6
+ # Listentry 2
7
+ * Listentry 2.1
8
+ * Listentry 2.2
9
+ # Listentry 3
10
+
11
+ Text afterwords
12
+
@@ -0,0 +1,24 @@
1
+ <p >Text before
2
+ </p>
3
+
4
+ <ul >
5
+ <li >
6
+ Listentry 1
7
+ </li>
8
+ <li >
9
+ Listentry 2
10
+ <ul >
11
+ <li >
12
+ Listentry 2.1
13
+ </li>
14
+ <li >
15
+ Listentry 2.2
16
+ </li>
17
+ </ul>
18
+ </li>
19
+ <li >
20
+ Listentry 3
21
+ </li>
22
+ </ul>
23
+ <p >Text afterwords
24
+ </p>
@@ -0,0 +1,30 @@
1
+
2
+
3
+ Text before
4
+
5
+
6
+
7
+
8
+ \begin{itemize}
9
+
10
+ \item Listentry 1
11
+
12
+ \item Listentry 2
13
+
14
+ \begin{itemize}
15
+
16
+ \item Listentry 2.1
17
+
18
+ \item Listentry 2.2
19
+ \end{itemize}
20
+
21
+
22
+
23
+ \item Listentry 3
24
+ \end{itemize}
25
+
26
+
27
+
28
+ Text afterwords
29
+
30
+
@@ -0,0 +1,10 @@
1
+
2
+ Text before
3
+
4
+ - Listentry 1
5
+ - Listentry 2- Listentry 2.1
6
+ - Listentry 2.2
7
+ - Listentry 3
8
+
9
+ Text afterwords
10
+
@@ -0,0 +1,12 @@
1
+
2
+ Text before
3
+
4
+
5
+ * Listentry 1
6
+ * Listentry 2
7
+ * Listentry 2.1
8
+ * Listentry 2.2
9
+ * Listentry 3
10
+
11
+ Text afterwords
12
+
@@ -0,0 +1,39 @@
1
+ <p >Text before
2
+ </p>
3
+
4
+ <ul >
5
+ <li >
6
+ Listentry 1
7
+ </li>
8
+ <li >
9
+ Listentry 2
10
+ <ul >
11
+ <li >
12
+ Listentry 2.1
13
+ </li>
14
+ <li >
15
+ Listentry 2.2
16
+ <ul >
17
+ <li >
18
+ Listentry 2.2.1
19
+ <ul >
20
+ <li >
21
+ Listentry 2.2.1.1
22
+ <ul >
23
+ <li >
24
+ Listentry 2.2.1.1.1
25
+ </li>
26
+ </ul>
27
+ </li>
28
+ </ul>
29
+ </li>
30
+ </ul>
31
+ </li>
32
+ </ul>
33
+ </li>
34
+ <li >
35
+ Listentry 3
36
+ </li>
37
+ </ul>
38
+ <p >Text afterwords
39
+ </p>
@@ -0,0 +1,51 @@
1
+
2
+
3
+ Text before
4
+
5
+
6
+
7
+
8
+ \begin{itemize}
9
+
10
+ \item Listentry 1
11
+
12
+ \item Listentry 2
13
+
14
+ \begin{itemize}
15
+
16
+ \item Listentry 2.1
17
+
18
+ \item Listentry 2.2
19
+
20
+ \begin{itemize}
21
+
22
+ \item Listentry 2.2.1
23
+
24
+ \begin{itemize}
25
+
26
+ \item Listentry 2.2.1.1
27
+
28
+ \begin{itemize}
29
+
30
+ \item Listentry 2.2.1.1.1
31
+ \end{itemize}
32
+
33
+
34
+ \end{itemize}
35
+
36
+
37
+ \end{itemize}
38
+
39
+
40
+ \end{itemize}
41
+
42
+
43
+
44
+ \item Listentry 3
45
+ \end{itemize}
46
+
47
+
48
+
49
+ Text afterwords
50
+
51
+