webgen 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. data/COPYING +340 -0
  2. data/ChangeLog +2172 -0
  3. data/README +16 -0
  4. data/Rakefile +283 -0
  5. data/TODO +133 -0
  6. data/VERSION +1 -0
  7. data/bin/webgen +5 -0
  8. data/doc/extension.config +55 -0
  9. data/doc/src/default.css +129 -0
  10. data/doc/src/default.template +45 -0
  11. data/doc/src/design.gallery +18 -0
  12. data/doc/src/designs/default.png +0 -0
  13. data/doc/src/designs/nostyle.png +0 -0
  14. data/doc/src/designs/old.png +0 -0
  15. data/doc/src/documentation/extloader.page +20 -0
  16. data/doc/src/documentation/filehandler/backing.page +16 -0
  17. data/doc/src/documentation/filehandler/copy.page +12 -0
  18. data/doc/src/documentation/filehandler/directory.page +15 -0
  19. data/doc/src/documentation/filehandler/index.page +13 -0
  20. data/doc/src/documentation/filehandler/page.page +122 -0
  21. data/doc/src/documentation/filehandler/picturegallery.page +25 -0
  22. data/doc/src/documentation/filehandler/template.page +21 -0
  23. data/doc/src/documentation/index.page +47 -0
  24. data/doc/src/documentation/tags/date.page +19 -0
  25. data/doc/src/documentation/tags/executecommand.page +19 -0
  26. data/doc/src/documentation/tags/includefile.page +15 -0
  27. data/doc/src/documentation/tags/index.page +39 -0
  28. data/doc/src/documentation/tags/lang.de.page +6 -0
  29. data/doc/src/documentation/tags/lang.page +27 -0
  30. data/doc/src/documentation/tags/menu.de.page +11 -0
  31. data/doc/src/documentation/tags/menu.page +30 -0
  32. data/doc/src/documentation/tags/meta.page +20 -0
  33. data/doc/src/documentation/tags/multilang.de.page +4 -0
  34. data/doc/src/documentation/tags/multilang.fr.page +4 -0
  35. data/doc/src/documentation/tags/multilang.page +4 -0
  36. data/doc/src/documentation/tags/navbar.page +19 -0
  37. data/doc/src/documentation/tags/relocatable.page +16 -0
  38. data/doc/src/documentation/tags/wikilink.page +18 -0
  39. data/doc/src/download.page +42 -0
  40. data/doc/src/features.page +14 -0
  41. data/doc/src/index.page +48 -0
  42. data/doc/src/logo.png +0 -0
  43. data/doc/src/meta.info +22 -0
  44. data/install.rb +19 -0
  45. data/lib/util/composite.rb +101 -0
  46. data/lib/util/listener.rb +105 -0
  47. data/lib/webgen/configuration.rb +216 -0
  48. data/lib/webgen/logging.rb +73 -0
  49. data/lib/webgen/node.rb +147 -0
  50. data/lib/webgen/plugins/extloader.rb +88 -0
  51. data/lib/webgen/plugins/filehandler/backing.rb +200 -0
  52. data/lib/webgen/plugins/filehandler/directory.rb +96 -0
  53. data/lib/webgen/plugins/filehandler/filecopy.rb +59 -0
  54. data/lib/webgen/plugins/filehandler/filehandler.rb +209 -0
  55. data/lib/webgen/plugins/filehandler/pagehandler/html.rb +43 -0
  56. data/lib/webgen/plugins/filehandler/pagehandler/markdown.rb +53 -0
  57. data/lib/webgen/plugins/filehandler/pagehandler/page.rb +205 -0
  58. data/lib/webgen/plugins/filehandler/pagehandler/rdoc.rb +50 -0
  59. data/lib/webgen/plugins/filehandler/pagehandler/textile.rb +52 -0
  60. data/lib/webgen/plugins/filehandler/picturegallery.rb +194 -0
  61. data/lib/webgen/plugins/filehandler/template.rb +98 -0
  62. data/lib/webgen/plugins/tags/date.rb +46 -0
  63. data/lib/webgen/plugins/tags/executecommand.rb +53 -0
  64. data/lib/webgen/plugins/tags/includefile.rb +60 -0
  65. data/lib/webgen/plugins/tags/lang.rb +50 -0
  66. data/lib/webgen/plugins/tags/menu.rb +198 -0
  67. data/lib/webgen/plugins/tags/meta.rb +54 -0
  68. data/lib/webgen/plugins/tags/navbar.rb +62 -0
  69. data/lib/webgen/plugins/tags/relocatable.rb +58 -0
  70. data/lib/webgen/plugins/tags/tags.rb +247 -0
  71. data/lib/webgen/plugins/tags/wikilink.rb +58 -0
  72. data/lib/webgen/plugins/treewalker.rb +81 -0
  73. data/lib/webgen/webgen.rb +155 -0
  74. data/setup.rb +1331 -0
  75. data/testsite/config.yaml +7 -0
  76. data/testsite/src/bluecloth.page +102 -0
  77. data/testsite/src/default.css +146 -0
  78. data/testsite/src/default.template +33 -0
  79. data/testsite/src/home.en.page +22 -0
  80. data/testsite/src/home.page +22 -0
  81. data/testsite/src/images/bghack.png +0 -0
  82. data/testsite/src/images/o.png +0 -0
  83. data/testsite/src/images/smagacor.png +0 -0
  84. data/testsite/src/images/tictactoe.png +0 -0
  85. data/testsite/src/images/x.png +0 -0
  86. data/testsite/src/index.page +21 -0
  87. data/testsite/src/meta.info +15 -0
  88. data/testsite/src/news.page +20 -0
  89. data/testsite/src/news_are_so-cool.de.page +19 -0
  90. data/testsite/src/noindex/noindex.page +20 -0
  91. data/testsite/src/pictures/index.page +20 -0
  92. data/testsite/src/projects.de.page +11 -0
  93. data/testsite/src/projects.es.page +11 -0
  94. data/testsite/src/projects.page +17 -0
  95. data/testsite/src/projects/00.index.de.page +10 -0
  96. data/testsite/src/projects/01.project2.page +20 -0
  97. data/testsite/src/projects/02.project1.page +20 -0
  98. data/testsite/src/projects/05.project3.page +22 -0
  99. data/testsite/src/projects/index.page +20 -0
  100. data/testsite/src/projects/subproj/index.page +22 -0
  101. data/testsite/src/projects/subproj/project3.page +21 -0
  102. data/testsite/src/rdoc.page +12 -0
  103. data/testsite/src/redcloth.page +106 -0
  104. data/testsite/src/test.gallery +5 -0
  105. metadata +155 -0
@@ -0,0 +1,7 @@
1
+ Configuration:
2
+ srcDirectory: src
3
+ outDirectory: output
4
+ verbosityLevel: 2
5
+
6
+ FileCopyHandler:
7
+ types: [css, jpg, png]
@@ -0,0 +1,102 @@
1
+ ---
2
+ blocks:
3
+ - {name: content, format: markdown}
4
+ ---
5
+ BlueCloth
6
+ =========
7
+
8
+ Version 0.0.4b - 2004/06/01
9
+
10
+ Original version by John Gruber <http://daringfireball.net/>.
11
+ Ruby port by Michael Granger <http://www.deveiate.org/>.
12
+
13
+ BlueCloth is a Ruby implementation of [Markdown][1], a text-to-HTML conversion
14
+ tool for web writers. To quote from the project page: Markdown allows you to
15
+ write using an easy-to-read, easy-to-write plain text format, then convert it to
16
+ structurally valid XHTML (or HTML).
17
+
18
+ It borrows a naming convention and several helpings of interface from
19
+ [Redcloth][2], [Why the Lucky Stiff][3]'s processor for a similar text-to-HTML
20
+ conversion syntax called [Textile][4].
21
+
22
+
23
+ Installation
24
+ ------------
25
+
26
+ You can install this module either by running the included `install.rb` script,
27
+ or by simply copying `lib/bluecloth.rb` to a directory in your load path.
28
+
29
+
30
+ Dependencies
31
+ ------------
32
+
33
+ BlueCloth uses the `StringScanner` class from the `strscan` library, which comes
34
+ with Ruby 1.8.x and later or may be downloaded from the RAA for earlier
35
+ versions, and the `logger` library, which is also included in 1.8.x and later.
36
+
37
+
38
+ Example Usage
39
+ -------------
40
+
41
+ The BlueCloth class is a subclass of Ruby's String, and can be used thusly:
42
+
43
+ bc = BlueCloth::new( str )
44
+ puts bc.to_html
45
+
46
+ This `README` file is an example of Markdown syntax. The sample program
47
+ `bluecloth` in the `bin/` directory can be used to convert this (or any other)
48
+ file with Markdown syntax into HTML:
49
+
50
+ $ bin/bluecloth README > README.html
51
+
52
+
53
+ Acknowledgements
54
+ ----------------
55
+
56
+ This library is a port of the canonical Perl one, and so owes most of its
57
+ functionality to its author, John Gruber. The bugs in this code are most
58
+ certainly an artifact of my porting it and not an artifact of the excellent code
59
+ from which it is derived.
60
+
61
+ It also, as mentioned before, borrows its API liberally from RedCloth, both for
62
+ compatibility's sake, and because I think Why's code is beautiful. His excellent
63
+ code and peerless prose have been an inspiration to me, and this module is
64
+ intended as the sincerest flattery.
65
+
66
+ Also contributing to any success this module may enjoy are those among my peers
67
+ who have taken the time to help out, either by submitting patches, testing, or
68
+ offering suggestions and review:
69
+
70
+ * Martin Chase <stillflame@FaerieMUD.org>
71
+ * Florian Gross <flgr@ccan.de>
72
+
73
+
74
+ Author/Legal
75
+ ------------
76
+
77
+ Original version:
78
+ Copyright (c) 2003-2004 John Gruber
79
+ <http://daringfireball.net/>
80
+ All rights reserved.
81
+
82
+ Ruby version:
83
+ Copyright (c) 2004 The FaerieMUD Consortium
84
+
85
+ BlueCloth is free software; you can redistribute it and/or modify it under the
86
+ terms of the GNU General Public License as published by the Free Software
87
+ Foundation; either version 2 of the License, or (at your option) any later
88
+ version.
89
+
90
+ BlueCloth is distributed in the hope that it will be useful, but WITHOUT ANY
91
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
92
+ PARTICULAR PURPOSE. See the GNU General Public License for more details.
93
+
94
+
95
+ [1]: http://daringfireball.net/projects/markdown/
96
+ [2]: http://www.whytheluckystiff.net/ruby/redcloth/
97
+ [3]: http://www.whytheluckystiff.net/
98
+ [4]: http://www.textism.com/tools/textile/
99
+
100
+
101
+ $Id: README 51 2004-06-21 15:20:59Z deveiant $
102
+ $URL: svn+ssh://cvs.faeriemud.org/var/svn/BlueCloth/trunk/README $
@@ -0,0 +1,146 @@
1
+ @media print {
2
+ body {
3
+ margin: 0px;
4
+ }
5
+
6
+ div#menu, div#footer {
7
+ display: none;
8
+ }
9
+
10
+ }
11
+
12
+ @media screen, projection {
13
+
14
+ html {
15
+ margin: 0px 10%;
16
+ background-color: #eee;
17
+ }
18
+
19
+ body {
20
+ margin: 0px;
21
+ padding: 0px;
22
+ background-color: #fff;
23
+ font-size: 12px;
24
+ font-family: Verdana, Arial, Helvetica;
25
+ }
26
+
27
+ /* General layout of the page */
28
+
29
+ #header, #footer {
30
+ width: 100%;
31
+ background-color: #8ad;
32
+ color: #fff;
33
+ }
34
+
35
+ #pagebody {
36
+ width: 100%;
37
+ background: url("images/bghack.png") repeat-y #fff;
38
+ }
39
+
40
+ #menu {
41
+ float: left;
42
+ width: 180px;
43
+ padding: 20px 0px 0px 20px;
44
+ background: url("images/bghack.png") repeat-y #fff;
45
+ }
46
+
47
+ #body {
48
+ margin-left: 200px;
49
+ padding: 20px;
50
+ }
51
+
52
+ #footer {
53
+ clear: both;
54
+ padding: 5px 0px;
55
+ text-align: center;
56
+ }
57
+
58
+
59
+ /* styling the header */
60
+
61
+ #navbar {
62
+ width: 100%;
63
+ font-size: 90%;
64
+ }
65
+
66
+ span#navtree, span#languages {
67
+ padding: 3px;
68
+ width: 45%;
69
+ }
70
+
71
+ span#navtree {
72
+ float: left;
73
+ text-align: left;
74
+ }
75
+
76
+ span#languages {
77
+ float: right;
78
+ text-align: right;
79
+ }
80
+
81
+ div#header h1 {
82
+ margin: 0px;
83
+ padding: 15px 2em;
84
+
85
+ font-size: 300%;
86
+ font-style: italic;
87
+ font-weight: normal;
88
+ }
89
+
90
+
91
+ /* styling the menu */
92
+
93
+ #menu a {
94
+ text-decoration: none;
95
+ color: #469;
96
+ font-weight: bold;
97
+ font-size: 130%;
98
+ }
99
+
100
+ #menu a:hover {
101
+ text-decoration: underline;
102
+ }
103
+
104
+ #menu .webgen-menuitem-selected {
105
+ background-color: #fff;
106
+ width: 90%;
107
+ border-right: 3px solid #8ad;
108
+ }
109
+
110
+ #menu .webgen-submenu {
111
+ background-color: #aaa;
112
+ }
113
+
114
+ #menu ul {
115
+ list-style-type: none;
116
+ padding: 0px;
117
+ margin-left: 10px;
118
+ }
119
+
120
+ #menu li > ul {
121
+ font-size: 95%;
122
+ }
123
+
124
+ #menu li {
125
+ margin: 0.5em 0px;
126
+ }
127
+
128
+ /* styling the content */
129
+
130
+ div.section {
131
+ margin-bottom: 30px;
132
+ }
133
+
134
+ h2.section_header {
135
+ padding: 0px;
136
+ border-bottom: 3px double #68b;
137
+
138
+ letter-spacing: 0.2em;
139
+ font-size: 150%;
140
+ font-weight: normal;
141
+ color: #68b;
142
+ }
143
+
144
+
145
+
146
+ }
@@ -0,0 +1,33 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4
+ <head>
5
+ <title>{title: }</title>
6
+ <link href="{relocatable: default.css}" rel="stylesheet" />
7
+ </head>
8
+ <body>
9
+ <div id="header">
10
+ <h1>{title: }</h1>
11
+ <div id="navbar">
12
+ <span id="navtree">{navbar: }</span>
13
+ <span id="languages">{lang: }</span>
14
+ <div style="clear: both; border-bottom: 1px solid #8ad"></div>
15
+ </div>
16
+ </div>
17
+
18
+ <div id="pagebody">
19
+ <div id="menu">
20
+ {menu: }
21
+ </div>
22
+
23
+ <div id="body">
24
+ {content: }
25
+ </div>
26
+ </div>
27
+
28
+ <div id="footer">
29
+ {revision: }
30
+ </div>
31
+
32
+ </body>
33
+ </html>
@@ -0,0 +1,22 @@
1
+ ---
2
+ title: Home page
3
+ inMenu: true
4
+ blocks:
5
+ - {name: content, format: html}
6
+ ---
7
+ <h1>The Homepage</h1>
8
+ Solvitur acris hiems grata vice veris et Favoni, Trahuntque siccas
9
+ machinae carinas, Ac neque iam stabulis gaudet pecus aut arator
10
+ igni, Nec prata canis albicant pruinis. Iam Cytherea chores ducit
11
+ Venus imminente luna, Iunctaeque Nymphis Gratiae decentes Alterno
12
+ terr am quatiunt pede, dum gravis Cyclopum Volcanus ardens visit
13
+ officinas. Nunc decet aut viridi nitidum caput impedire myrto Aut
14
+ flore terrae quem ferunt solutae; Nunc et in umbrosis Fauno decet
15
+ immolare lucis, Seu posc<b>test</b>at agna sive malit haedo. Pallida mors aequo
16
+ pulsat pede pauperum tabernas Regumque turris. 0 beate Sesti, Vitae
17
+ summa brevis spem nos vetat incohare longam. Iam te premet nox,
18
+ fabulaeque Manes, Et domus exilis Plutonia; quo simul mearis, Nec
19
+ regna vini sortiere talis Nec tenerum Lycidan mirabere, quo calet
20
+ iuventus Nunc omnis et mox virgines tepebunt.
21
+ <a href="{relocatable: projects.html}">Projekte</a>
22
+ <h2>test</h2>
@@ -0,0 +1,22 @@
1
+ ---
2
+ title: Home page
3
+ inMenu: true
4
+ blocks:
5
+ - {name: content, format: html}
6
+ ---
7
+ <h1>The Homepage</h1>
8
+ Solvitur acris hiems grata vice veris et Favoni, Trahuntque siccas
9
+ machinae carinas, Ac neque iam stabulis gaudet pecus aut arator
10
+ igni, Nec prata canis albicant pruinis. Iam Cytherea chores ducit
11
+ Venus imminente luna, Iunctaeque Nymphis Gratiae decentes Alterno
12
+ terr am quatiunt pede, dum gravis Cyclopum Volcanus ardens visit
13
+ officinas. Nunc decet aut viridi nitidum caput impedire myrto Aut
14
+ flore terrae quem ferunt solutae; Nunc et in umbrosis Fauno decet
15
+ immolare lucis, Seu posc<b>test</b>at agna sive malit haedo. Pallida mors aequo
16
+ pulsat pede pauperum tabernas Regumque turris. 0 beate Sesti, Vitae
17
+ summa brevis spem nos vetat incohare longam. Iam te premet nox,
18
+ fabulaeque Manes, Et domus exilis Plutonia; quo simul mearis, Nec
19
+ regna vini sortiere talis Nec tenerum Lycidan mirabere, quo calet
20
+ iuventus Nunc omnis et mox virgines tepebunt.
21
+ <a href="{relocatable: projects.html}">Projekte</a>
22
+ <h2>test</h2>
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,21 @@
1
+ ---
2
+ title: Pictures index
3
+ inMenu: true
4
+ blocks:
5
+ - {name: content, format: html}
6
+ ---
7
+ <h1>The pictures index page</h1>
8
+ Solvitur acris hiems grata vice veris et Favoni, Trahuntque siccas
9
+ machinae carinas, Ac neque iam stabulis gaudet pecus aut arator
10
+ igni, Nec prata canis albicant pruinis. Iam Cytherea chores ducit
11
+ Venus imminente luna, Iunctaeque Nymphis Gratiae decentes Alterno
12
+ terram quatiunt pede, dum gravis Cyclopum Volcanus ardens visit
13
+ officinas. Nunc decet aut viridi nitidum caput impedire myrto Aut
14
+ flore terrae quem ferunt solutae; Nunc et in umbrosis Fauno decet
15
+ immolare lucis, Seu poscat agna sive malit haedo. Pallida mors aequo
16
+ pulsat pede pauperum tabernas Regumque turris. 0 beate Sesti, Vitae
17
+ summa brevis spem nos vetat incohare longam. Iam te premet nox,
18
+ fabulaeque Manes, Et domus exilis Plutonia; quo simul mearis, Nec
19
+ regna vini sortiere talis Nec tenerum Lycidan mirabere, quo calet
20
+ iuventus Nunc omnis et mox virgines tepebunt.
21
+ <img src="{relocatable: /images/bghack.png}" width="100" height="100"/>
@@ -0,0 +1,15 @@
1
+ home.html:
2
+ de:
3
+ title: Neuer Titel
4
+ inMenu: true
5
+
6
+ en:
7
+ title: Home page menu
8
+
9
+ index.html:
10
+ en:
11
+ directoryName: ''
12
+
13
+ noindex/noindex.html:
14
+ en:
15
+ title: Title by backing file
@@ -0,0 +1,20 @@
1
+ ---
2
+ title: New page
3
+ inMenu: true
4
+ blocks:
5
+ - {name: content, format: html}
6
+ ---
7
+ <h1>The News page</h1>
8
+ Solvitur acris hiems grata vice veris et Favoni, Trahuntque siccas
9
+ machinae carinas, Ac neque iam stabulis gaudet pecus aut arator
10
+ igni, Nec prata canis albicant pruinis. Iam Cytherea chores ducit
11
+ Venus imminente luna, Iunctaeque Nymphis Gratiae decentes Alterno
12
+ terram quatiunt pede, dum gravis Cyclopum Volcanus ardens visit
13
+ officinas. Nunc decet aut viridi nitidum caput impedire myrto Aut
14
+ flore terrae quem ferunt solutae; Nunc et in umbrosis Fauno decet
15
+ immolare lucis, Seu poscat agna sive malit haedo. Pallida mors aequo
16
+ pulsat pede pauperum tabernas Regumque turris. 0 beate Sesti, Vitae
17
+ summa brevis spem nos vetat incohare longam. Iam te premet nox,
18
+ fabulaeque Manes, Et domus exilis Plutonia; quo simul mearis, Nec
19
+ regna vini sortiere talis Nec tenerum Lycidan mirabere, quo calet
20
+ iuventus Nunc omnis et mox virgines tepebunt.
@@ -0,0 +1,19 @@
1
+ ---
2
+ inMenu: true
3
+ blocks:
4
+ - {name: content, format: html}
5
+ ---
6
+ <h1>The News page</h1>
7
+ Solvitur acris hiems grata vice veris et Favoni, Trahuntque siccas
8
+ machinae carinas, Ac neque iam stabulis gaudet pecus aut arator
9
+ igni, Nec prata canis albicant pruinis. Iam Cytherea chores ducit
10
+ Venus imminente luna, Iunctaeque Nymphis Gratiae decentes Alterno
11
+ terram quatiunt pede, dum gravis Cyclopum Volcanus ardens visit
12
+ officinas. Nunc decet aut viridi nitidum caput impedire myrto Aut
13
+ flore terrae quem ferunt solutae; Nunc et in umbrosis Fauno decet
14
+ immolare lucis, Seu poscat agna sive malit haedo. Pallida mors aequo
15
+ pulsat pede pauperum tabernas Regumque turris. 0 beate Sesti, Vitae
16
+ summa brevis spem nos vetat incohare longam. Iam te premet nox,
17
+ fabulaeque Manes, Et domus exilis Plutonia; quo simul mearis, Nec
18
+ regna vini sortiere talis Nec tenerum Lycidan mirabere, quo calet
19
+ iuventus Nunc omnis et mox virgines tepebunt.
@@ -0,0 +1,20 @@
1
+ ---
2
+ title: New page
3
+ inMenu: true
4
+ blocks:
5
+ - {name: content, format: html}
6
+ ---
7
+ <h1>The News page</h1>
8
+ Solvitur acris hiems grata vice veris et Favoni, Trahuntque siccas
9
+ machinae carinas, Ac neque iam stabulis gaudet pecus aut arator
10
+ igni, Nec prata canis albicant pruinis. Iam Cytherea chores ducit
11
+ Venus imminente luna, Iunctaeque Nymphis Gratiae decentes Alterno
12
+ terram quatiunt pede, dum gravis Cyclopum Volcanus ardens visit
13
+ officinas. Nunc decet aut viridi nitidum caput impedire myrto Aut
14
+ flore terrae quem ferunt solutae; Nunc et in umbrosis Fauno decet
15
+ immolare lucis, Seu poscat agna sive malit haedo. Pallida mors aequo
16
+ pulsat pede pauperum tabernas Regumque turris. 0 beate Sesti, Vitae
17
+ summa brevis spem nos vetat incohare longam. Iam te premet nox,
18
+ fabulaeque Manes, Et domus exilis Plutonia; quo simul mearis, Nec
19
+ regna vini sortiere talis Nec tenerum Lycidan mirabere, quo calet
20
+ iuventus Nunc omnis et mox virgines tepebunt.