webgen 0.3.8 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (618) hide show
  1. data/ChangeLog +2565 -14
  2. data/README +4 -6
  3. data/Rakefile +207 -89
  4. data/TODO +175 -17
  5. data/VERSION +1 -1
  6. data/bin/webgen +1 -2
  7. data/data/webgen/gallery-creator/default.png +0 -0
  8. data/data/webgen/gallery_styles/default/README +6 -0
  9. data/data/webgen/gallery_styles/default/gallery_gallery.template +38 -0
  10. data/data/webgen/gallery_styles/default/gallery_image.template +30 -0
  11. data/data/webgen/gallery_styles/default/gallery_main.template +18 -0
  12. data/data/webgen/gallery_styles/slides/README +18 -0
  13. data/data/webgen/gallery_styles/slides/collage.rb +334 -0
  14. data/data/webgen/gallery_styles/slides/gallery_gallery.template +62 -0
  15. data/data/webgen/gallery_styles/slides/gallery_image.template +53 -0
  16. data/data/webgen/gallery_styles/slides/gallery_main.template +32 -0
  17. data/data/webgen/resources/images/generated_by_webgen.png +0 -0
  18. data/data/webgen/resources/images/webgen_logo.png +0 -0
  19. data/data/webgen/website_styles/1024px/README +10 -0
  20. data/data/webgen/website_styles/1024px/default.css +188 -0
  21. data/data/webgen/website_styles/1024px/default.template +62 -0
  22. data/data/webgen/website_styles/1024px/images/background.gif +0 -0
  23. data/data/webgen/website_styles/andreas00/README +10 -0
  24. data/data/webgen/website_styles/andreas00/default.css +290 -0
  25. data/data/webgen/website_styles/andreas00/default.template +62 -0
  26. data/data/webgen/website_styles/andreas00/images/bg.gif +0 -0
  27. data/data/webgen/website_styles/andreas00/images/front.jpg +0 -0
  28. data/data/webgen/website_styles/andreas00/images/menubg.gif +0 -0
  29. data/data/webgen/website_styles/andreas00/images/menubg2.gif +0 -0
  30. data/data/webgen/website_styles/andreas01/README +11 -0
  31. data/data/webgen/website_styles/andreas01/default.css +310 -0
  32. data/data/webgen/website_styles/andreas01/default.template +63 -0
  33. data/data/webgen/website_styles/andreas01/images/bg.gif +0 -0
  34. data/data/webgen/website_styles/andreas01/images/front.jpg +0 -0
  35. data/data/webgen/website_styles/andreas01/print.css +35 -0
  36. data/data/webgen/website_styles/andreas03/README +11 -0
  37. data/data/webgen/website_styles/andreas03/default.css +223 -0
  38. data/data/webgen/website_styles/andreas03/default.template +60 -0
  39. data/data/webgen/website_styles/andreas03/images/bodybg.png +0 -0
  40. data/data/webgen/website_styles/andreas03/images/contbg.png +0 -0
  41. data/data/webgen/website_styles/andreas03/images/footerbg.png +0 -0
  42. data/data/webgen/website_styles/andreas03/images/gradient1.png +0 -0
  43. data/data/webgen/website_styles/andreas03/images/gradient2.png +0 -0
  44. data/data/webgen/website_styles/andreas04/README +12 -0
  45. data/data/webgen/website_styles/andreas04/default.css +290 -0
  46. data/data/webgen/website_styles/andreas04/default.template +83 -0
  47. data/data/webgen/website_styles/andreas04/images/blinkarrow.gif +0 -0
  48. data/data/webgen/website_styles/andreas04/images/bodybg.png +0 -0
  49. data/data/webgen/website_styles/andreas04/images/contentbg.png +0 -0
  50. data/data/webgen/website_styles/andreas04/images/entrybg.png +0 -0
  51. data/data/webgen/website_styles/andreas04/images/flash.gif +0 -0
  52. data/data/webgen/website_styles/andreas04/images/flash2.gif +0 -0
  53. data/data/webgen/website_styles/andreas04/images/globe.gif +0 -0
  54. data/data/webgen/website_styles/andreas04/images/globebottom.gif +0 -0
  55. data/data/webgen/website_styles/andreas04/images/linkarrow.gif +0 -0
  56. data/data/webgen/website_styles/andreas04/images/menuhover.png +0 -0
  57. data/data/webgen/website_styles/andreas05/README +11 -0
  58. data/data/webgen/website_styles/andreas05/default.css +33 -0
  59. data/data/webgen/website_styles/andreas05/default.template +42 -0
  60. data/data/webgen/website_styles/andreas05/images/bodybg.gif +0 -0
  61. data/data/webgen/website_styles/andreas05/images/front.png +0 -0
  62. data/data/webgen/website_styles/andreas06/README +11 -0
  63. data/data/webgen/website_styles/andreas06/default.css +353 -0
  64. data/data/webgen/website_styles/andreas06/default.template +72 -0
  65. data/data/webgen/website_styles/andreas06/images/bodybg.gif +0 -0
  66. data/data/webgen/website_styles/andreas06/images/boxbg.gif +0 -0
  67. data/data/webgen/website_styles/andreas06/images/greypx.gif +0 -0
  68. data/data/webgen/website_styles/andreas06/images/header.jpg +0 -0
  69. data/data/webgen/website_styles/andreas06/images/innerbg.gif +0 -0
  70. data/data/webgen/website_styles/andreas06/images/leaves.jpg +0 -0
  71. data/data/webgen/website_styles/andreas06/images/tabs.gif +0 -0
  72. data/data/webgen/website_styles/andreas07/README +12 -0
  73. data/data/webgen/website_styles/andreas07/browserfix.css +7 -0
  74. data/data/webgen/website_styles/andreas07/default.css +92 -0
  75. data/data/webgen/website_styles/andreas07/default.template +44 -0
  76. data/data/webgen/website_styles/andreas07/images/bodybg.gif +0 -0
  77. data/data/webgen/website_styles/andreas07/images/sidebarbg.gif +0 -0
  78. data/data/webgen/website_styles/andreas08/README +11 -0
  79. data/data/webgen/website_styles/andreas08/default.css +224 -0
  80. data/data/webgen/website_styles/andreas08/default.template +53 -0
  81. data/data/webgen/website_styles/andreas09/README +11 -0
  82. data/data/webgen/website_styles/andreas09/default.css +308 -0
  83. data/data/webgen/website_styles/andreas09/default.template +70 -0
  84. data/data/webgen/website_styles/andreas09/images/bodybg-black.jpg +0 -0
  85. data/data/webgen/website_styles/andreas09/images/bodybg-green.jpg +0 -0
  86. data/data/webgen/website_styles/andreas09/images/bodybg-orange.jpg +0 -0
  87. data/data/webgen/website_styles/andreas09/images/bodybg-purple.jpg +0 -0
  88. data/data/webgen/website_styles/andreas09/images/bodybg-red.jpg +0 -0
  89. data/data/webgen/website_styles/andreas09/images/bodybg.jpg +0 -0
  90. data/data/webgen/website_styles/andreas09/images/footerbg.jpg +0 -0
  91. data/data/webgen/website_styles/andreas09/images/menuhover-black.jpg +0 -0
  92. data/data/webgen/website_styles/andreas09/images/menuhover-green.jpg +0 -0
  93. data/data/webgen/website_styles/andreas09/images/menuhover-orange.jpg +0 -0
  94. data/data/webgen/website_styles/andreas09/images/menuhover-purple.jpg +0 -0
  95. data/data/webgen/website_styles/andreas09/images/menuhover-red.jpg +0 -0
  96. data/data/webgen/website_styles/andreas09/images/menuhover.jpg +0 -0
  97. data/data/webgen/website_styles/default/README +6 -0
  98. data/data/webgen/website_styles/default/default.css +1 -1
  99. data/data/webgen/website_styles/default/default.template +9 -3
  100. data/data/webgen/website_styles/plain/README +12 -0
  101. data/data/webgen/website_styles/plain/default.css +244 -0
  102. data/data/webgen/website_styles/plain/default.template +63 -0
  103. data/data/webgen/website_styles/plain/images/a_hover.jpg +0 -0
  104. data/data/webgen/website_styles/plain/images/desc.jpg +0 -0
  105. data/data/webgen/website_styles/plain/images/li.gif +0 -0
  106. data/data/webgen/website_styles/plain/images/mainbar.jpg +0 -0
  107. data/data/webgen/website_styles/plain/images/menu.jpg +0 -0
  108. data/data/webgen/website_styles/plain/images/submenua.gif +0 -0
  109. data/data/webgen/website_styles/plain/images/submenua_hover.jpg +0 -0
  110. data/data/webgen/website_templates/default/README +7 -5
  111. data/data/webgen/website_templates/personal_hp/README +7 -5
  112. data/data/webgen/website_templates/project/README +8 -6
  113. data/doc/config.yaml +2 -2
  114. data/doc/examples/website_styles/1024px/README +9 -0
  115. data/doc/examples/website_styles/1024px/config.yaml +2 -0
  116. data/doc/examples/website_styles/1024px/src/about.page +12 -0
  117. data/doc/examples/website_styles/1024px/src/default.css +188 -0
  118. data/doc/examples/website_styles/1024px/src/default.template +62 -0
  119. data/doc/examples/website_styles/1024px/src/download.page +15 -0
  120. data/doc/examples/website_styles/1024px/src/features.page +8 -0
  121. data/doc/examples/website_styles/1024px/src/images/background.gif +0 -0
  122. data/doc/examples/website_styles/1024px/src/index.page +9 -0
  123. data/doc/examples/website_styles/1024px/src/screenshots.page +18 -0
  124. data/doc/examples/website_styles/andreas00/README +9 -0
  125. data/doc/examples/website_styles/andreas00/config.yaml +2 -0
  126. data/doc/examples/website_styles/andreas00/src/about.page +12 -0
  127. data/doc/examples/website_styles/andreas00/src/default.css +290 -0
  128. data/doc/examples/website_styles/andreas00/src/default.template +62 -0
  129. data/doc/examples/website_styles/andreas00/src/download.page +15 -0
  130. data/doc/examples/website_styles/andreas00/src/features.page +8 -0
  131. data/doc/examples/website_styles/andreas00/src/images/bg.gif +0 -0
  132. data/doc/examples/website_styles/andreas00/src/images/front.jpg +0 -0
  133. data/doc/examples/website_styles/andreas00/src/images/menubg.gif +0 -0
  134. data/doc/examples/website_styles/andreas00/src/images/menubg2.gif +0 -0
  135. data/doc/examples/website_styles/andreas00/src/index.page +9 -0
  136. data/doc/examples/website_styles/andreas00/src/screenshots.page +18 -0
  137. data/doc/examples/website_styles/andreas01/README +9 -0
  138. data/doc/examples/website_styles/andreas01/config.yaml +2 -0
  139. data/doc/examples/website_styles/andreas01/src/about.page +12 -0
  140. data/doc/examples/website_styles/andreas01/src/default.css +310 -0
  141. data/doc/examples/website_styles/andreas01/src/default.template +63 -0
  142. data/doc/examples/website_styles/andreas01/src/download.page +15 -0
  143. data/doc/examples/website_styles/andreas01/src/features.page +8 -0
  144. data/doc/examples/website_styles/andreas01/src/images/bg.gif +0 -0
  145. data/doc/examples/website_styles/andreas01/src/images/front.jpg +0 -0
  146. data/doc/examples/website_styles/andreas01/src/index.page +9 -0
  147. data/doc/examples/website_styles/andreas01/src/print.css +35 -0
  148. data/doc/examples/website_styles/andreas01/src/screenshots.page +18 -0
  149. data/doc/examples/website_styles/andreas03/README +9 -0
  150. data/doc/examples/website_styles/andreas03/config.yaml +2 -0
  151. data/doc/examples/website_styles/andreas03/src/about.page +12 -0
  152. data/doc/examples/website_styles/andreas03/src/default.css +223 -0
  153. data/doc/examples/website_styles/andreas03/src/default.template +60 -0
  154. data/doc/examples/website_styles/andreas03/src/download.page +15 -0
  155. data/doc/examples/website_styles/andreas03/src/features.page +8 -0
  156. data/doc/examples/website_styles/andreas03/src/images/bodybg.png +0 -0
  157. data/doc/examples/website_styles/andreas03/src/images/contbg.png +0 -0
  158. data/doc/examples/website_styles/andreas03/src/images/footerbg.png +0 -0
  159. data/doc/examples/website_styles/andreas03/src/images/gradient1.png +0 -0
  160. data/doc/examples/website_styles/andreas03/src/images/gradient2.png +0 -0
  161. data/doc/examples/website_styles/andreas03/src/index.page +9 -0
  162. data/doc/examples/website_styles/andreas03/src/screenshots.page +18 -0
  163. data/doc/examples/website_styles/andreas04/README +9 -0
  164. data/doc/examples/website_styles/andreas04/config.yaml +2 -0
  165. data/doc/examples/website_styles/andreas04/src/about.page +12 -0
  166. data/doc/examples/website_styles/andreas04/src/default.css +290 -0
  167. data/doc/examples/website_styles/andreas04/src/default.template +83 -0
  168. data/doc/examples/website_styles/andreas04/src/download.page +15 -0
  169. data/doc/examples/website_styles/andreas04/src/features.page +8 -0
  170. data/doc/examples/website_styles/andreas04/src/images/blinkarrow.gif +0 -0
  171. data/doc/examples/website_styles/andreas04/src/images/bodybg.png +0 -0
  172. data/doc/examples/website_styles/andreas04/src/images/contentbg.png +0 -0
  173. data/doc/examples/website_styles/andreas04/src/images/entrybg.png +0 -0
  174. data/doc/examples/website_styles/andreas04/src/images/flash.gif +0 -0
  175. data/doc/examples/website_styles/andreas04/src/images/flash2.gif +0 -0
  176. data/doc/examples/website_styles/andreas04/src/images/globe.gif +0 -0
  177. data/doc/examples/website_styles/andreas04/src/images/globebottom.gif +0 -0
  178. data/doc/examples/website_styles/andreas04/src/images/linkarrow.gif +0 -0
  179. data/doc/examples/website_styles/andreas04/src/images/menuhover.png +0 -0
  180. data/doc/examples/website_styles/andreas04/src/index.page +9 -0
  181. data/doc/examples/website_styles/andreas04/src/screenshots.page +18 -0
  182. data/doc/examples/website_styles/andreas05/README +9 -0
  183. data/doc/examples/website_styles/andreas05/config.yaml +2 -0
  184. data/doc/examples/website_styles/andreas05/src/about.page +12 -0
  185. data/doc/examples/website_styles/andreas05/src/default.css +33 -0
  186. data/doc/examples/website_styles/andreas05/src/default.template +42 -0
  187. data/doc/examples/website_styles/andreas05/src/download.page +15 -0
  188. data/doc/examples/website_styles/andreas05/src/features.page +8 -0
  189. data/doc/examples/website_styles/andreas05/src/images/bodybg.gif +0 -0
  190. data/doc/examples/website_styles/andreas05/src/images/front.png +0 -0
  191. data/doc/examples/website_styles/andreas05/src/index.page +9 -0
  192. data/doc/examples/website_styles/andreas05/src/screenshots.page +18 -0
  193. data/doc/examples/website_styles/andreas06/README +9 -0
  194. data/doc/examples/website_styles/andreas06/config.yaml +2 -0
  195. data/doc/examples/website_styles/andreas06/src/about.page +12 -0
  196. data/doc/examples/website_styles/andreas06/src/default.css +353 -0
  197. data/doc/examples/website_styles/andreas06/src/default.template +72 -0
  198. data/doc/examples/website_styles/andreas06/src/download.page +15 -0
  199. data/doc/examples/website_styles/andreas06/src/features.page +8 -0
  200. data/doc/examples/website_styles/andreas06/src/images/bodybg.gif +0 -0
  201. data/doc/examples/website_styles/andreas06/src/images/boxbg.gif +0 -0
  202. data/doc/examples/website_styles/andreas06/src/images/greypx.gif +0 -0
  203. data/doc/examples/website_styles/andreas06/src/images/header.jpg +0 -0
  204. data/doc/examples/website_styles/andreas06/src/images/innerbg.gif +0 -0
  205. data/doc/examples/website_styles/andreas06/src/images/leaves.jpg +0 -0
  206. data/doc/examples/website_styles/andreas06/src/images/tabs.gif +0 -0
  207. data/doc/examples/website_styles/andreas06/src/index.page +9 -0
  208. data/doc/examples/website_styles/andreas06/src/screenshots.page +18 -0
  209. data/doc/examples/website_styles/andreas07/README +9 -0
  210. data/doc/examples/website_styles/andreas07/config.yaml +2 -0
  211. data/doc/examples/website_styles/andreas07/src/about.page +12 -0
  212. data/doc/examples/website_styles/andreas07/src/browserfix.css +7 -0
  213. data/doc/examples/website_styles/andreas07/src/default.css +92 -0
  214. data/doc/examples/website_styles/andreas07/src/default.template +44 -0
  215. data/doc/examples/website_styles/andreas07/src/download.page +15 -0
  216. data/doc/examples/website_styles/andreas07/src/features.page +8 -0
  217. data/doc/examples/website_styles/andreas07/src/images/bodybg.gif +0 -0
  218. data/doc/examples/website_styles/andreas07/src/images/sidebarbg.gif +0 -0
  219. data/doc/examples/website_styles/andreas07/src/index.page +9 -0
  220. data/doc/examples/website_styles/andreas07/src/screenshots.page +18 -0
  221. data/doc/examples/website_styles/andreas08/README +9 -0
  222. data/doc/examples/website_styles/andreas08/config.yaml +2 -0
  223. data/doc/examples/website_styles/andreas08/src/about.page +12 -0
  224. data/doc/examples/website_styles/andreas08/src/default.css +224 -0
  225. data/doc/examples/website_styles/andreas08/src/default.template +53 -0
  226. data/doc/examples/website_styles/andreas08/src/download.page +15 -0
  227. data/doc/examples/website_styles/andreas08/src/features.page +8 -0
  228. data/doc/examples/website_styles/andreas08/src/index.page +9 -0
  229. data/doc/examples/website_styles/andreas08/src/screenshots.page +18 -0
  230. data/doc/examples/website_styles/andreas09/README +9 -0
  231. data/doc/examples/website_styles/andreas09/config.yaml +2 -0
  232. data/doc/examples/website_styles/andreas09/src/about.page +12 -0
  233. data/doc/examples/website_styles/andreas09/src/default.css +308 -0
  234. data/doc/examples/website_styles/andreas09/src/default.template +70 -0
  235. data/doc/examples/website_styles/andreas09/src/download.page +15 -0
  236. data/doc/examples/website_styles/andreas09/src/features.page +8 -0
  237. data/doc/examples/website_styles/andreas09/src/images/bodybg-black.jpg +0 -0
  238. data/doc/examples/website_styles/andreas09/src/images/bodybg-green.jpg +0 -0
  239. data/doc/examples/website_styles/andreas09/src/images/bodybg-orange.jpg +0 -0
  240. data/doc/examples/website_styles/andreas09/src/images/bodybg-purple.jpg +0 -0
  241. data/doc/examples/website_styles/andreas09/src/images/bodybg-red.jpg +0 -0
  242. data/doc/examples/website_styles/andreas09/src/images/bodybg.jpg +0 -0
  243. data/doc/examples/website_styles/andreas09/src/images/footerbg.jpg +0 -0
  244. data/doc/examples/website_styles/andreas09/src/images/menuhover-black.jpg +0 -0
  245. data/doc/examples/website_styles/andreas09/src/images/menuhover-green.jpg +0 -0
  246. data/doc/examples/website_styles/andreas09/src/images/menuhover-orange.jpg +0 -0
  247. data/doc/examples/website_styles/andreas09/src/images/menuhover-purple.jpg +0 -0
  248. data/doc/examples/website_styles/andreas09/src/images/menuhover-red.jpg +0 -0
  249. data/doc/examples/website_styles/andreas09/src/images/menuhover.jpg +0 -0
  250. data/doc/examples/website_styles/andreas09/src/index.page +9 -0
  251. data/doc/examples/website_styles/andreas09/src/screenshots.page +18 -0
  252. data/doc/examples/website_styles/default/README +9 -0
  253. data/doc/examples/website_styles/default/config.yaml +2 -0
  254. data/doc/examples/website_styles/default/src/about.page +12 -0
  255. data/doc/examples/website_styles/default/src/default.css +84 -0
  256. data/doc/examples/website_styles/default/src/default.template +38 -0
  257. data/doc/examples/website_styles/default/src/download.page +15 -0
  258. data/doc/examples/website_styles/default/src/features.page +8 -0
  259. data/doc/examples/website_styles/default/src/index.page +9 -0
  260. data/doc/examples/website_styles/default/src/screenshots.page +18 -0
  261. data/doc/examples/website_styles/plain/README +9 -0
  262. data/doc/examples/website_styles/plain/config.yaml +2 -0
  263. data/doc/examples/website_styles/plain/src/about.page +12 -0
  264. data/doc/examples/website_styles/plain/src/default.css +244 -0
  265. data/doc/examples/website_styles/plain/src/default.template +63 -0
  266. data/doc/examples/website_styles/plain/src/download.page +15 -0
  267. data/doc/examples/website_styles/plain/src/features.page +8 -0
  268. data/doc/examples/website_styles/plain/src/images/a_hover.jpg +0 -0
  269. data/doc/examples/website_styles/plain/src/images/desc.jpg +0 -0
  270. data/doc/examples/website_styles/plain/src/images/li.gif +0 -0
  271. data/doc/examples/website_styles/plain/src/images/mainbar.jpg +0 -0
  272. data/doc/examples/website_styles/plain/src/images/menu.jpg +0 -0
  273. data/doc/examples/website_styles/plain/src/images/submenua.gif +0 -0
  274. data/doc/examples/website_styles/plain/src/images/submenua_hover.jpg +0 -0
  275. data/doc/examples/website_styles/plain/src/index.page +9 -0
  276. data/doc/examples/website_styles/plain/src/screenshots.page +18 -0
  277. data/doc/examples/website_templates/default/README +8 -0
  278. data/doc/examples/website_templates/default/config.yaml +2 -0
  279. data/doc/examples/website_templates/default/src/default.css +84 -0
  280. data/doc/examples/website_templates/default/src/default.template +38 -0
  281. data/doc/examples/website_templates/default/src/index.page +8 -0
  282. data/doc/examples/website_templates/personal_hp/README +8 -0
  283. data/doc/examples/website_templates/personal_hp/config.yaml +2 -0
  284. data/doc/examples/website_templates/personal_hp/src/about.page +12 -0
  285. data/doc/examples/website_templates/personal_hp/src/default.css +84 -0
  286. data/doc/examples/website_templates/personal_hp/src/default.template +38 -0
  287. data/doc/examples/website_templates/personal_hp/src/index.page +9 -0
  288. data/doc/examples/website_templates/personal_hp/src/links.page +22 -0
  289. data/doc/examples/website_templates/personal_hp/src/projects.page +20 -0
  290. data/doc/examples/website_templates/project/README +9 -0
  291. data/doc/examples/website_templates/project/config.yaml +2 -0
  292. data/doc/examples/website_templates/project/src/about.page +12 -0
  293. data/doc/examples/website_templates/project/src/default.css +84 -0
  294. data/doc/examples/website_templates/project/src/default.template +38 -0
  295. data/doc/examples/website_templates/project/src/download.page +15 -0
  296. data/doc/examples/website_templates/project/src/features.page +8 -0
  297. data/doc/examples/website_templates/project/src/index.page +9 -0
  298. data/doc/examples/website_templates/project/src/screenshots.page +18 -0
  299. data/doc/metainfo.yaml +85 -0
  300. data/doc/plugin/emoticon.rb +19 -21
  301. data/doc/plugin/extension.rb +134 -55
  302. data/doc/plugin/gallery/slides/collage.rb +334 -0
  303. data/doc/plugin/listpluginparameters.rb +24 -26
  304. data/doc/plugin/resources.rb +20 -22
  305. data/doc/src/default.css +333 -154
  306. data/doc/src/default.template +92 -39
  307. data/doc/src/documentation/extending_webgen.page +1 -2
  308. data/doc/src/documentation/gettingstarted.page +161 -44
  309. data/doc/src/documentation/index.page +15 -28
  310. data/doc/src/documentation/plugins/contentconverter/default.page +15 -0
  311. data/doc/src/documentation/plugins/contentconverter/html.page +10 -0
  312. data/doc/src/documentation/plugins/contentconverter/markdown.page +21 -0
  313. data/doc/src/documentation/plugins/contentconverter/rdoc.page +11 -0
  314. data/doc/src/documentation/plugins/contentconverter/textile.page +21 -0
  315. data/doc/src/documentation/plugins/contentconverter/xmlbuilder.page +61 -0
  316. data/doc/src/documentation/plugins/core/configuration.page +11 -0
  317. data/doc/src/documentation/plugins/core/filehandler.page +214 -0
  318. data/doc/src/documentation/plugins/core/index.page +11 -0
  319. data/doc/src/documentation/plugins/core/resourcemanager.page +46 -0
  320. data/doc/src/documentation/plugins/core/tagprocessor.page +17 -0
  321. data/doc/src/documentation/plugins/file/copyhandler.page +26 -0
  322. data/doc/src/documentation/plugins/file/defaulthandler.page +15 -0
  323. data/doc/src/documentation/plugins/file/directoryhandler.page +37 -0
  324. data/doc/src/documentation/plugins/file/galleryhandler.page +181 -0
  325. data/doc/src/documentation/plugins/file/pagehandler.page +154 -0
  326. data/doc/src/documentation/plugins/file/templatehandler.page +34 -0
  327. data/doc/src/documentation/plugins/file/thumbnailwriter.page +39 -0
  328. data/doc/src/documentation/plugins/htmlvalidator/default.page +12 -0
  329. data/doc/src/documentation/plugins/htmlvalidator/xmllint.page +12 -0
  330. data/doc/src/documentation/plugins/index.page +32 -11
  331. data/doc/src/documentation/plugins/menustyle/default.page +19 -0
  332. data/doc/src/documentation/plugins/menustyle/horizontal.page +32 -0
  333. data/doc/src/documentation/plugins/{menustyles → menustyle}/horizontaldropdown.page +25 -19
  334. data/doc/src/documentation/plugins/menustyle/section.page +34 -0
  335. data/doc/src/documentation/plugins/menustyle/vertical.page +48 -0
  336. data/doc/src/documentation/plugins/menustyle/verticaldropdown.page +29 -0
  337. data/doc/src/documentation/plugins/misc/index.page +9 -0
  338. data/doc/src/documentation/plugins/{miscplugins → misc}/smileyreplacer.page +15 -14
  339. data/doc/src/documentation/plugins/misc/syntaxhighlighter.page +26 -0
  340. data/doc/src/documentation/plugins/tag/block.page +29 -0
  341. data/doc/src/documentation/plugins/tag/breadcrumbtrail.page +29 -0
  342. data/doc/src/documentation/plugins/tag/date.page +34 -0
  343. data/doc/src/documentation/plugins/tag/default.page +27 -0
  344. data/doc/src/documentation/plugins/tag/download.page +60 -0
  345. data/doc/src/documentation/plugins/tag/executecommand.page +29 -0
  346. data/doc/src/documentation/plugins/tag/includefile.page +30 -0
  347. data/doc/src/documentation/plugins/{tags → tag}/langbar.de.page +1 -1
  348. data/doc/src/documentation/plugins/tag/langbar.fr.page +6 -0
  349. data/doc/src/documentation/plugins/tag/langbar.page +41 -0
  350. data/doc/src/documentation/plugins/tag/menu.page +78 -0
  351. data/doc/src/documentation/plugins/{tags → tag}/meta.page +8 -7
  352. data/doc/src/documentation/plugins/tag/relocatable.page +46 -0
  353. data/doc/src/documentation/plugins/tag/resource.page +35 -0
  354. data/doc/src/documentation/plugins/tag/sitemap.page +35 -0
  355. data/doc/src/documentation/plugins/tag/wikilink.page +33 -0
  356. data/doc/src/documentation/references/index.page +0 -1
  357. data/doc/src/documentation/references/meta_info_reference.page +90 -13
  358. data/doc/src/documentation/references/parameter_reference.page +0 -1
  359. data/doc/src/documentation/references/webpage_format.page +249 -0
  360. data/doc/src/download.page +50 -21
  361. data/doc/src/examples/gallery_styles/default/default.gallery +78 -0
  362. data/doc/src/examples/gallery_styles/default/gallery_gallery.template +38 -0
  363. data/doc/src/examples/gallery_styles/default/gallery_image.template +30 -0
  364. data/doc/src/examples/gallery_styles/default/gallery_main.template +18 -0
  365. data/doc/src/examples/gallery_styles/index.page +22 -0
  366. data/doc/src/examples/gallery_styles/slides/gallery_gallery.template +62 -0
  367. data/doc/src/examples/gallery_styles/slides/gallery_image.template +53 -0
  368. data/doc/src/examples/gallery_styles/slides/gallery_main.template +32 -0
  369. data/doc/src/examples/gallery_styles/slides/slides.gallery +79 -0
  370. data/doc/src/examples/images/image01.jpg +0 -0
  371. data/doc/src/examples/images/image02.jpg +0 -0
  372. data/doc/src/examples/images/image03.jpg +0 -0
  373. data/doc/src/examples/images/image04.jpg +0 -0
  374. data/doc/src/examples/images/image05.jpg +0 -0
  375. data/doc/src/examples/images/image06.jpg +0 -0
  376. data/doc/src/examples/images/image07.jpg +0 -0
  377. data/doc/src/examples/images/image08.jpg +0 -0
  378. data/doc/src/examples/images/image09.jpg +0 -0
  379. data/doc/src/examples/images/image10.jpg +0 -0
  380. data/doc/src/examples/images/image11.jpg +0 -0
  381. data/doc/src/examples/images/image12.jpg +0 -0
  382. data/doc/src/examples/images/image13.jpg +0 -0
  383. data/doc/src/examples/images/image14.jpg +0 -0
  384. data/doc/src/examples/images/image15.jpg +0 -0
  385. data/doc/src/examples/images/image16.jpg +0 -0
  386. data/doc/src/examples/images/image17.jpg +0 -0
  387. data/doc/src/examples/images/image18.jpg +0 -0
  388. data/doc/src/examples/index.page +18 -0
  389. data/doc/src/examples/website_styles/1024px.page +5 -0
  390. data/doc/src/examples/website_styles/andreas00.page +5 -0
  391. data/doc/src/examples/website_styles/andreas01.page +5 -0
  392. data/doc/src/examples/website_styles/andreas03.page +5 -0
  393. data/doc/src/examples/website_styles/andreas04.page +5 -0
  394. data/doc/src/examples/website_styles/andreas05.page +5 -0
  395. data/doc/src/examples/website_styles/andreas06.page +5 -0
  396. data/doc/src/examples/website_styles/andreas07.page +5 -0
  397. data/doc/src/examples/website_styles/andreas08.page +5 -0
  398. data/doc/src/examples/website_styles/andreas09.page +5 -0
  399. data/doc/src/examples/website_styles/default.page +5 -0
  400. data/doc/src/examples/website_styles/index.page +71 -0
  401. data/doc/src/examples/website_styles/plain.page +5 -0
  402. data/doc/src/examples/website_templates/default.page +5 -0
  403. data/doc/src/examples/website_templates/index.page +24 -0
  404. data/doc/src/examples/website_templates/personal_hp.page +5 -0
  405. data/doc/src/examples/website_templates/project.page +5 -0
  406. data/doc/src/features.page +16 -14
  407. data/doc/src/images/bodybg.jpg +0 -0
  408. data/doc/src/images/footerbg.jpg +0 -0
  409. data/doc/src/images/menuhover.jpg +0 -0
  410. data/doc/src/images/node_diagram.svg +7132 -0
  411. data/doc/src/images/thumb_example.jpg +0 -0
  412. data/doc/src/images/thumb_example_cropped.jpg +0 -0
  413. data/doc/src/images/thumb_example_normal.jpg +0 -0
  414. data/doc/src/index.page +14 -102
  415. data/doc/src/news.page +154 -0
  416. data/doc/src/plugin.template +10 -0
  417. data/lib/webgen/cli.rb +427 -0
  418. data/lib/webgen/composite.rb +11 -11
  419. data/lib/webgen/config.rb +52 -0
  420. data/lib/webgen/content.rb +172 -0
  421. data/lib/webgen/extcommand.rb +23 -0
  422. data/lib/webgen/languages.rb +110 -0
  423. data/lib/webgen/listener.rb +1 -1
  424. data/lib/webgen/node.rb +196 -124
  425. data/lib/webgen/plugin.rb +480 -144
  426. data/lib/webgen/plugins/{contenthandlers → contentconverters}/default.rb +10 -9
  427. data/lib/webgen/plugins/{contenthandlers → contentconverters}/html.rb +11 -8
  428. data/lib/webgen/plugins/contentconverters/markdown.rb +54 -0
  429. data/lib/webgen/plugins/{contenthandlers → contentconverters}/rdoc.rb +16 -12
  430. data/lib/webgen/plugins/{contenthandlers → contentconverters}/textile.rb +18 -13
  431. data/lib/webgen/plugins/contentconverters/xmlbuilder.rb +58 -0
  432. data/lib/webgen/plugins/coreplugins/configuration.rb +11 -102
  433. data/lib/webgen/plugins/coreplugins/resourcemanager.rb +95 -74
  434. data/lib/webgen/plugins/filehandlers/copy.rb +41 -19
  435. data/lib/webgen/plugins/filehandlers/directory.rb +52 -50
  436. data/lib/webgen/plugins/filehandlers/filehandler.rb +370 -123
  437. data/lib/webgen/plugins/filehandlers/gallery.rb +368 -117
  438. data/lib/webgen/plugins/filehandlers/page.rb +160 -146
  439. data/lib/webgen/plugins/filehandlers/template.rb +65 -52
  440. data/lib/webgen/plugins/htmlvalidators/default.rb +9 -7
  441. data/lib/webgen/plugins/htmlvalidators/xmllint.rb +17 -33
  442. data/lib/webgen/plugins/menustyles/default.rb +27 -25
  443. data/lib/webgen/plugins/menustyles/horizontal.rb +22 -41
  444. data/lib/webgen/plugins/menustyles/horizontal_dropdown.rb +25 -39
  445. data/lib/webgen/plugins/menustyles/section.rb +68 -0
  446. data/lib/webgen/plugins/menustyles/vertical.rb +36 -56
  447. data/lib/webgen/plugins/menustyles/vertical_dropdown.rb +24 -32
  448. data/lib/webgen/plugins/miscplugins/smileyreplacer.rb +20 -17
  449. data/lib/webgen/plugins/miscplugins/syntax_highlighter.rb +72 -0
  450. data/lib/webgen/plugins/miscplugins/treewalker.rb +9 -36
  451. data/lib/webgen/plugins/tags/block.rb +65 -0
  452. data/lib/webgen/plugins/tags/breadcrumbtrail.rb +15 -11
  453. data/lib/webgen/plugins/tags/date.rb +11 -7
  454. data/lib/webgen/plugins/tags/download.rb +38 -38
  455. data/lib/webgen/plugins/tags/executecommand.rb +30 -15
  456. data/lib/webgen/plugins/tags/includefile.rb +26 -13
  457. data/lib/webgen/plugins/tags/langbar.rb +23 -18
  458. data/lib/webgen/plugins/tags/menu.rb +49 -70
  459. data/lib/webgen/plugins/tags/meta.rb +12 -9
  460. data/lib/webgen/plugins/tags/relocatable.rb +41 -13
  461. data/lib/webgen/plugins/tags/sitemap.rb +32 -28
  462. data/lib/webgen/plugins/tags/tag_processor.rb +279 -0
  463. data/lib/webgen/plugins/tags/wikilink.rb +25 -20
  464. data/lib/webgen/test.rb +202 -0
  465. data/lib/webgen/website.rb +310 -0
  466. data/test/fixtures/sample_site/src/chained.template +3 -0
  467. data/test/fixtures/sample_site/src/default.template +3 -0
  468. data/test/fixtures/sample_site/src/dir1/dir11/file111.de.page +3 -0
  469. data/test/fixtures/sample_site/src/dir1/dir11/file111.page +3 -0
  470. data/test/fixtures/sample_site/src/dir1/dir11/index.page +3 -0
  471. data/test/fixtures/sample_site/src/dir1/file11.page +3 -0
  472. data/test/fixtures/sample_site/src/dir2/file21.page +3 -0
  473. data/test/fixtures/sample_site/src/embedded.rhtml +1 -0
  474. data/test/fixtures/sample_site/src/file1.page +8 -0
  475. data/test/fixtures/sample_site/src/file2.de.page +6 -0
  476. data/test/fixtures/sample_site/src/index.de.page +4 -0
  477. data/test/fixtures/sample_site/src/index.en.page +1 -0
  478. data/test/fixtures/sample_site/src/invalid.template +3 -0
  479. data/test/fixtures/sample_site/src/test.jpg +1 -0
  480. data/test/fixtures/sample_site/src/test.template +3 -0
  481. data/test/fixtures/tc_content/blocks.yaml +40 -0
  482. data/test/fixtures/tc_content/correct.yaml +65 -0
  483. data/test/fixtures/tc_content/incorrect.yaml +42 -0
  484. data/test/fixtures/tc_filehandler_filehandler/backing/metainfo.yaml +9 -0
  485. data/test/fixtures/tc_filehandler_filehandler/backing_empty/metainfo.yaml +6 -0
  486. data/test/fixtures/tc_filehandler_filehandler/sample_plugin.rb +49 -0
  487. data/test/fixtures/tc_filehandler_filehandler/unmodified +0 -0
  488. data/test/fixtures/tc_filehandler_gallery/test.gallery +2 -0
  489. data/test/fixtures/tc_filehandler_gallery/test1.gallery +2 -0
  490. data/test/fixtures/tc_filehandler_gallery/test1.jpg +0 -0
  491. data/test/fixtures/tc_filehandler_gallery/test2.jpg +0 -0
  492. data/test/fixtures/tc_filehandler_gallery/test3.jpg +0 -0
  493. data/test/fixtures/tc_filehandler_gallery/test4.jpg +0 -0
  494. data/test/fixtures/tc_filehandler_page/testdata.yaml +10 -0
  495. data/test/fixtures/tc_menustyles_default/menustyle.rb +7 -0
  496. data/test/fixtures/tc_node/nodes.yaml +64 -0
  497. data/test/fixtures/tc_plugin/handlerplugin.rb +15 -0
  498. data/test/fixtures/tc_plugin/plugin1.rb +33 -0
  499. data/test/fixtures/tc_plugin/plugin2.rb +8 -0
  500. data/test/fixtures/tc_tags_includefile/testfile +1 -0
  501. data/test/fixtures/tc_tags_tag_processor/test_file1 +1 -0
  502. data/test/fixtures/tc_tags_tag_processor/testtag.rb +17 -0
  503. data/test/fixtures/tc_website/correct.yaml +6 -0
  504. data/test/fixtures/tc_website/incorrect_structure.yaml +2 -0
  505. data/test/fixtures/tc_website/incorrect_yaml.yaml +5 -0
  506. data/test/fixtures/tc_website/meta_info_test.yaml +10 -0
  507. data/test/fixtures/tc_website/testdir/README +1 -0
  508. data/test/fixtures/tc_website/testdir/falsedir/README +1 -0
  509. data/test/runtests.rb +2 -0
  510. data/test/unittests/tc_composite.rb +82 -0
  511. data/test/unittests/tc_config.rb +18 -0
  512. data/test/unittests/tc_content.rb +88 -0
  513. data/test/unittests/tc_contentconverters_default.rb +13 -0
  514. data/test/unittests/tc_contentconverters_html.rb +16 -0
  515. data/test/unittests/tc_contentconverters_markdown.rb +22 -0
  516. data/test/unittests/tc_contentconverters_rdoc.rb +16 -0
  517. data/test/unittests/tc_contentconverters_textile.rb +22 -0
  518. data/test/unittests/tc_contentconverters_xmlbuilder.rb +22 -0
  519. data/test/unittests/tc_filehandler_copy.rb +65 -0
  520. data/test/unittests/tc_filehandler_directory.rb +134 -0
  521. data/test/unittests/tc_filehandler_filehandler.rb +294 -0
  522. data/test/unittests/tc_filehandler_gallery.rb +165 -0
  523. data/test/unittests/tc_filehandler_page.rb +183 -0
  524. data/test/unittests/tc_filehandler_template.rb +60 -0
  525. data/test/unittests/tc_htmlvalidators_default.rb +12 -0
  526. data/test/unittests/tc_htmlvalidators_xmllint.rb +19 -0
  527. data/test/unittests/tc_languages.rb +57 -0
  528. data/test/unittests/tc_listener.rb +72 -0
  529. data/test/unittests/tc_menustyles_default.rb +51 -0
  530. data/test/unittests/tc_menustyles_horizontal.rb +18 -0
  531. data/test/unittests/tc_menustyles_horizontal_dropdown.rb +18 -0
  532. data/test/unittests/tc_menustyles_section.rb +59 -0
  533. data/test/unittests/tc_menustyles_vertical.rb +79 -0
  534. data/test/unittests/tc_menustyles_vertical_dropdown.rb +18 -0
  535. data/test/unittests/tc_node.rb +202 -0
  536. data/test/unittests/tc_plugin.rb +214 -0
  537. data/test/unittests/tc_resourcemanager.rb +42 -0
  538. data/test/unittests/tc_smileyreplacer.rb +25 -0
  539. data/test/unittests/tc_syntax_highlighter.rb +30 -0
  540. data/test/unittests/tc_tags_block.rb +27 -0
  541. data/test/unittests/tc_tags_breadcrumbtrail.rb +22 -0
  542. data/test/unittests/tc_tags_date.rb +15 -0
  543. data/test/unittests/tc_tags_download.rb +32 -0
  544. data/test/unittests/tc_tags_executecommand.rb +37 -0
  545. data/test/unittests/tc_tags_includefile.rb +53 -0
  546. data/test/unittests/tc_tags_langbar.rb +42 -0
  547. data/test/unittests/tc_tags_menu.rb +50 -0
  548. data/test/unittests/tc_tags_meta.rb +19 -0
  549. data/test/unittests/tc_tags_relocatable.rb +66 -0
  550. data/test/unittests/tc_tags_sitemap.rb +33 -0
  551. data/test/unittests/tc_tags_tag_processor.rb +107 -0
  552. data/test/unittests/tc_tags_wikilink.rb +22 -0
  553. data/test/unittests/tc_treewalker.rb +44 -0
  554. data/test/unittests/tc_website.rb +188 -0
  555. metadata +829 -312
  556. data/bin/webgen-gallery-editor +0 -654
  557. data/bin/webgen-gui +0 -10
  558. data/data/webgen/website_templates/default/config.yaml +0 -2
  559. data/doc/plugin/clidesc.rb +0 -46
  560. data/doc/plugin/source.rb +0 -21
  561. data/doc/src/about.page +0 -22
  562. data/doc/src/documentation/cli.page +0 -12
  563. data/doc/src/documentation/plugins/contenthandlers/html.page +0 -11
  564. data/doc/src/documentation/plugins/contenthandlers/index.page +0 -7
  565. data/doc/src/documentation/plugins/contenthandlers/markdown.page +0 -11
  566. data/doc/src/documentation/plugins/contenthandlers/rdoc.page +0 -11
  567. data/doc/src/documentation/plugins/contenthandlers/textile.page +0 -11
  568. data/doc/src/documentation/plugins/coreplugins/configuration.page +0 -12
  569. data/doc/src/documentation/plugins/coreplugins/index.page +0 -7
  570. data/doc/src/documentation/plugins/coreplugins/logging.page +0 -13
  571. data/doc/src/documentation/plugins/coreplugins/resourcemanager.page +0 -34
  572. data/doc/src/documentation/plugins/filehandlers/backing.page +0 -46
  573. data/doc/src/documentation/plugins/filehandlers/copy.page +0 -12
  574. data/doc/src/documentation/plugins/filehandlers/directoryhandler.page +0 -35
  575. data/doc/src/documentation/plugins/filehandlers/gallery.page +0 -86
  576. data/doc/src/documentation/plugins/filehandlers/index.page +0 -34
  577. data/doc/src/documentation/plugins/filehandlers/page.page +0 -170
  578. data/doc/src/documentation/plugins/filehandlers/template.page +0 -21
  579. data/doc/src/documentation/plugins/gallerylayouters/index.page +0 -18
  580. data/doc/src/documentation/plugins/htmlvalidators/index.page +0 -6
  581. data/doc/src/documentation/plugins/htmlvalidators/xmllint.page +0 -14
  582. data/doc/src/documentation/plugins/menustyles/horizontal.page +0 -21
  583. data/doc/src/documentation/plugins/menustyles/index.page +0 -12
  584. data/doc/src/documentation/plugins/menustyles/partial.page +0 -27
  585. data/doc/src/documentation/plugins/menustyles/vertical.page +0 -32
  586. data/doc/src/documentation/plugins/menustyles/verticaldropdown.page +0 -23
  587. data/doc/src/documentation/plugins/miscplugins/index.page +0 -7
  588. data/doc/src/documentation/plugins/tags/breadcrumbtrail.page +0 -20
  589. data/doc/src/documentation/plugins/tags/date.page +0 -19
  590. data/doc/src/documentation/plugins/tags/download.page +0 -23
  591. data/doc/src/documentation/plugins/tags/executecommand.page +0 -18
  592. data/doc/src/documentation/plugins/tags/includefile.page +0 -15
  593. data/doc/src/documentation/plugins/tags/index.page +0 -44
  594. data/doc/src/documentation/plugins/tags/langbar.page +0 -27
  595. data/doc/src/documentation/plugins/tags/menu.de.page +0 -12
  596. data/doc/src/documentation/plugins/tags/menu.page +0 -19
  597. data/doc/src/documentation/plugins/tags/multilang.de.page +0 -4
  598. data/doc/src/documentation/plugins/tags/multilang.fr.page +0 -4
  599. data/doc/src/documentation/plugins/tags/multilang.page +0 -4
  600. data/doc/src/documentation/plugins/tags/relocatable.page +0 -16
  601. data/doc/src/documentation/plugins/tags/resource.page +0 -22
  602. data/doc/src/documentation/plugins/tags/sitemap.page +0 -17
  603. data/doc/src/documentation/plugins/tags/wikilink.page +0 -18
  604. data/doc/src/documentation/webgen_gallery_editor.page +0 -82
  605. data/doc/src/images/screenshots/wge-image.png +0 -0
  606. data/doc/src/images/screenshots/wge-layout-preview.png +0 -0
  607. data/doc/src/images/screenshots/wge-main-disabled.png +0 -0
  608. data/doc/src/images/screenshots/wge-main.png +0 -0
  609. data/doc/src/meta.info +0 -30
  610. data/doc/src/screenshots.gallery +0 -33
  611. data/install.rb +0 -19
  612. data/lib/webgen.rb +0 -277
  613. data/lib/webgen/plugins/contenthandlers/markdown.rb +0 -50
  614. data/lib/webgen/plugins/coreplugins/logging.rb +0 -101
  615. data/lib/webgen/plugins/filehandlers/backing.rb +0 -159
  616. data/lib/webgen/plugins/gallerylayouters/default.rb +0 -152
  617. data/lib/webgen/plugins/menustyles/partial.rb +0 -95
  618. data/lib/webgen/plugins/tags/tags.rb +0 -254
@@ -3,9 +3,16 @@ title: HomePage
3
3
  inMenu: true
4
4
  directoryName: webgen
5
5
  ---
6
- h2. Welcome
6
+ h2. About _webgen_
7
7
 
8
- ... to the homepage of _*webgen*_, a template based static website generator.
8
+ webgen is used to generate web pages from page and template files. You create one or more template
9
+ files in which you define the layout of your page and where the content should go. After that you
10
+ create page files in which you only define the content.
11
+
12
+ When webgen is run it combines the template with each of the page files and generates the HTML
13
+ output files. During this process special tags are substituted so that, for example, a menu is
14
+ generated. Actually, this website was generated with webgen and, for example, the menu that you can
15
+ see was created dynamically. For more information look at the documentation!
9
16
 
10
17
  This whole site was generated with webgen and provides an online demonstration of its features.
11
18
  Choose from the menu what you want to see from or know about webgen!
@@ -16,105 +23,10 @@ can "report it here!":http://rubyforge.org/tracker/?atid=1207&group_id=296&func=
16
23
  are "forums":http://rubyforge.org/forum/?group_id=296 and a "mailing
17
24
  list":http://rubyforge.org/mail/?group_id=296 available if you have any questions!
18
25
 
19
- h2. News
20
-
21
- <b>29.12.2005 - webgen 0.3.8 release!!!</b>
22
-
23
- Bug fix release
24
-
25
- <b>27.11.2005 - webgen 0.3.7 released!!!</b>
26
-
27
- Major changes:
28
-
29
- * Now using cmdparse version 2.0.0!
30
- * %{color:red}Attention%: For unified naming in reference to image galleries, I have removed all occurences of the word "picture" from the code and documentation and replaced it with "image". Therefore you may need to adapt your code, especially custom gallery layouters!
31
- * %{color:red}Attention%: Many documentation and library files have been renamed for better consistency! Custom plugins may have to be adapted!
32
- * <b>New <a href="{relocatable: /documentation/webgen_gallery_editor.page}">application</a></b> for managing image galleries (only alpha quality currently!)
33
- * Smileys are now optionally replaced with emoticons (<notextile>:-) ;-) :'-( 8-)</notextile>, several different emoticon packs available) -> see <a href="{relocatable: documentation/plugins/miscplugins/smileyreplacer.page}">SmileyReplacer</a>
34
- * <a href="{relocatable: documentation/extending_webgen.page}">Site specific commands</a> (used in command line processing) can now be used
35
- * New plugin <a href="{relocatable: documentation/plugins/tags/download.page}">Download Tag</a> for nice download links
36
- * New parameters: <a href="{relocatable: documentation/plugins/filehandlers/page.page}">PageFileHandler:defaultPageMetaData</a>, <a href="{relocatable: documentation/plugins/tags/sitemap.page}">SitemapTag:honorInMenu</a>
37
- * Removed parameters: PageFileHandler:useERB, PageFileHandler:defaultContentFormat
38
- * Renamed tag <b>navbar</b> to <b>breadcrumbTrail</b>
39
- * Images in image galleries can now be ordered by specifying the @orderInfo@ meta information
40
- * The use of directory index files is now optional: by setting the parameter <a href="{relocatable: documentation/plugins/filehandlers/directoryhandler.page}">DirectoryHandler:indexFile</a> to nil directory index files are not used
41
- * Languages can now be specified using 2-char ISO-639-1 codes or 3-char ISO-639-2 codes
42
- * Now there is a link (next to the wiki link) to the source of each page unless the page was programmatically generated.
43
-
44
- <b>24.06.2005 - webgen 0.3.5 released!!!</b>
45
-
46
- Major changes:
47
-
48
- * Now using cmdparse version 1.0.3!
49
- * New CLI command "clean" for deleting the generated or all files from the output directory
50
- * Restructured menu tag -> five different menu styles now available (see <a href="{relocatable: documentation/plugins/menustyles}">Menu Styles</a>)
51
- * New plugin <a href="{relocatable: documentation/plugins/coreplugins/resourcemanager.page}">ResourceManager</a> for defining resources
52
- * New plugin <a href="{relocatable: documentation/plugins/tags/resource.page}">Resource Tag</a> for accessing resources
53
- * Pages files can now be referenced in @relocatable@ tag and backing files with a standardified name (see <a href="{relocatable: documentation/plugins/filehandlers/page.page#naming}">here</a>), despite an eventually self defined naming scheme
54
- * New parameters: <a href="{relocatable: documentation/plugins/tags/langbar.page}">LangbarTag:showOwnLang</a>
55
- * Changed paramters: <a href="{relocatable: documentation/plugins/filehandlers/page.page}">PageFileHandler:validator</a> (now deactivated by default)
56
- * Fixed bugs
57
-
58
- <b>12.05.2005 - webgen 0.3.4 released!!!</b>
59
-
60
- Major changes:
61
-
62
- * FileHandler now uses path patterns and/or extensions for determining which files to process !
63
- * ERB (embedded ruby) can now be used in templates and page files (see <a href="{relocatable: documentation/plugins/filehandlers/page.page}">PageFileHandler</a>)!
64
- * Relocatable tag now accepts complex URIs (URIs with query and fragment part, absolute URIs)
65
- * Changed meta info name *menuOrder* to *orderInfo* (e.g. used for specifying order information for menus) -- you have to adapt your page and backing files!!!
66
- * New parameters: <a href="{relocatable: documentation/plugins/filehandlers/page.page}">PageFileHandler:useERB</a>
67
- * Changed parameters: <a href="{relocatable: documentation/plugins/filehandlers}">FileHandler:ignorePaths</a>, <a href="{relocatable: documentation/plugins/filehandlers/copy.page}">CopyFileHandler:paths</a>
68
- * New page describing meta information items used by plugins
69
- * Fixed bugs
70
-
71
- <b>21.04.2005 - webgen 0.3.3 released!!!</b>
72
-
73
- Major changes:
74
-
75
- * New command line interface based on "CommandParser":http://cmdparse.rubyforge.org
76
- * Now you can let webgen create the basic directories and files by executing @webgen create my_site@
77
- * New logging plugin lets you have more control over logging and log files
78
- * Now each website can have a plugin directory
79
- * New parameters for: <a href="{relocatable: documentation/plugins/tags/wikilink.page}">wikilink</a>
80
- * Changed format of backing files -> have a look at the <a href="{relocatable: documentation/plugins/filehandlers/backing.page}">documentation</a>!
81
- * Removed obsolete Extension Loader plugin
82
- * Fixed bugs
83
-
84
-
85
- <b>17.03.2005 - webgen 0.3.2 released!!!</b>
86
-
87
- Bug fix release for bug #1637 and other bugs
88
-
89
-
90
- <b>16.03.2005 - webgen 0.3.1 released!!!</b>
91
-
92
- Major changes:
93
-
94
- * Better DefaultLayouter for image galleries (<a href="{relocatable: Screenshots_1.page}">online demo</a>)
95
- * Output names for page files now customizable (see <a href="{relocatable: documentation/plugins/filehandlers/page.page}">PageFileHandler</a>)
96
- * On-the-fly creation of thumbnails for images with RMagick
97
- * New tags: <a href="{relocatable: documentation/plugins/tags/sitemap.page}">sitemap</a>
98
- * Tag @lang@ renamed, new name @langbar@!
99
- * New parameters for @menu@ tag
100
- * Automatic checking of HTML files on their validness
101
- * Fixed bugs
102
-
103
-
104
- <b>21.02.2005 - webgen 0.3.0 released!!!</b>
105
-
106
- Major changes:
107
-
108
- * Textile, Markdown, RDOC and HTML as content format supported!!!
109
- * New tags: <a href="{relocatable: documentation/plugins/tags/wikilink.page}">wikilink</a>
110
- * Improved plugin system
111
- * On-the-fly creation of new tags
112
- * Fixed bugs
113
- * Improved online documentation: pages on file handlers and tags now show parameters and other
114
- additional info
115
- * Added comprehensive test suite
116
- * and more...
117
26
 
118
- h2. And so ...
27
+ h2. Author
119
28
 
120
- ... have fun!
29
+ * *Thomas Leitner*
30
+ * Web: "http://webgen.rubyforge.org":http://webgen.rubyforge.org
31
+ * e-Mail: "t_leitner@gmx.at":mailto:t_leitner@gmx.at
32
+ * GPG Key-Id: 0xD942E7F6
@@ -0,0 +1,154 @@
1
+ ---
2
+ title: News
3
+ inMenu: true
4
+ ---
5
+ h2. News
6
+
7
+
8
+ h3(#news-2007-01-05). 05.01.2007 - webgen 0.4.0
9
+
10
+
11
+ This is a major release with many updates to the webgen core, the plugins and the documentation.
12
+ Plugins written for prior version won't work with this one anymore. However, changing them to work
13
+ again is easy. As an upgrade guide is currently not available have a look at webgen plugins and the
14
+ API documentation to see how to do upgrade plugins.
15
+
16
+ Major changes:
17
+
18
+ * New website layout :-)
19
+ * webgen now includes many <a href="{relocatable: examples/website_styles}">website styles</a> which can be used out of the box!
20
+ * Template files have the same format as page files now and can be nested!
21
+ * Speed-up through caching of node information
22
+ * New and cool gallery style
23
+ * New content converter plugin ({plugin: ContentConverter/XmlBuilder})
24
+ * New plugin for syntax highlighting ({plugin: Misc/SyntaxHighlighter})
25
+ * Many changes to the core (plugin system revised, webgen can now be used from other Ruby applications directly, faster node resolution, hooks are now spelled with only lowercase letters, ...)
26
+ * Structure of meta information @blocks@ changed
27
+ * New meta information @linkAttrs@ for setting additional attributes on links
28
+ * Handling and structure of meta information backing file changed
29
+ * Evaluation of page files changed (first converted to HTML, then ERB, then webgen tags)
30
+ * "Static" menus now available
31
+ * New sub-commands for the webgen command
32
+ * Gallery editor application deprecated.
33
+ * Many tests have been added.
34
+ * Documentation on the homepage as well as the API documentation is now more complete
35
+ * Fixed many bugs
36
+ * *Many other changes*
37
+
38
+ For detailed information have a look at the ChangeLog file included in the webgen distribution!
39
+
40
+ *Upcoming features:*
41
+
42
+ * More documentation
43
+ * Blogging plugins
44
+ * RSS generation plugins
45
+
46
+
47
+ h3(#news-2005-12-29). 29.12.2005 - webgen 0.3.8
48
+
49
+
50
+ Bug fix release
51
+
52
+
53
+ h3(#news-2005-11-27). 27.11.2005 - webgen 0.3.7
54
+
55
+
56
+ Major changes:
57
+
58
+ * Now using cmdparse version 2.0.0!
59
+ * %{color:red}Attention%: For unified naming in reference to image galleries, I have removed all occurences of the word "picture" from the code and documentation and replaced it with "image". Therefore you may need to adapt your code, especially custom gallery layouters!
60
+ * %{color:red}Attention%: Many documentation and library files have been renamed for better consistency! Custom plugins may have to be adapted!
61
+ * New application for managing image galleries (only alpha quality currently!)
62
+ * Smileys are now optionally replaced with emoticons (<notextile>:-) ;-) :'-( 8-)</notextile>, several different emoticon packs available) -> see {plugin: Misc/SmileyReplacer}
63
+ * <a href="{relocatable: documentation/extending_webgen.page}">Site specific commands</a> (used in command line processing) can now be used
64
+ * New plugin {plugin: Tag/Download} for nice download links
65
+ * New parameters: PageFileHandler:defaultPageMetaData, SitemapTag:honorInMenu
66
+ * Removed parameters: PageFileHandler:useERB, PageFileHandler:defaultContentFormat
67
+ * Renamed tag <b>navbar</b> to <b>breadcrumbTrail</b>
68
+ * Images in image galleries can now be ordered by specifying the @orderInfo@ meta information
69
+ * The use of directory index files is now optional: by setting the parameter File/DirectoryHandler:indexFile to nil directory index files are not used
70
+ * Languages can now be specified using 2-char ISO-639-1 codes or 3-char ISO-639-2 codes
71
+ * Now there is a link (next to the wiki link) to the source of each page unless the page was programmatically generated.
72
+
73
+
74
+ h3(#news-2005-06-24). 24.06.2005 - webgen 0.3.5
75
+
76
+
77
+ Major changes:
78
+
79
+ * Now using cmdparse version 1.0.3!
80
+ * New CLI command "clean" for deleting the generated or all files from the output directory
81
+ * Restructured menu tag -> five different menu styles now available (see {plugin: MenuStyle})
82
+ * New plugin {plugin: Core/ResourceManager} for defining resources
83
+ * New plugin {plugin: Tag/Resource} for accessing resources
84
+ * Pages files can now be referenced in @relocatable@ tag and backing files with a standardified name, despite an eventually self defined naming scheme
85
+ * New parameters: LangbarTag:showOwnLang
86
+ * Changed paramters: PageFileHandler:validator (now deactivated by default)
87
+ * Fixed bugs
88
+
89
+
90
+ h3(#news-2005-05-12). 12.05.2005 - webgen 0.3.4
91
+
92
+
93
+ Major changes:
94
+
95
+ * FileHandler now uses path patterns and/or extensions for determining which files to process !
96
+ * ERB (embedded ruby) can now be used in templates and page files !
97
+ * Relocatable tag now accepts complex URIs (URIs with query and fragment part, absolute URIs)
98
+ * Changed meta info name *menuOrder* to *orderInfo* (e.g. used for specifying order information for menus) -- you have to adapt your page and backing files!!!
99
+ * New parameters: PageFileHandler:useERB
100
+ * Changed parameters: FileHandler:ignorePaths, CopyFileHandler:paths
101
+ * New page describing meta information items used by plugins
102
+ * Fixed bugs
103
+
104
+
105
+ h3(#news-2005-04-21). 21.04.2005 - webgen 0.3.3
106
+
107
+
108
+ Major changes:
109
+
110
+ * New command line interface based on "CommandParser":http://cmdparse.rubyforge.org
111
+ * Now you can let webgen create the basic directories and files by executing @webgen create my_site@
112
+ * New logging plugin lets you have more control over logging and log files
113
+ * Now each website can have a plugin directory
114
+ * New parameters for: Tag/WikiLink
115
+ * Changed format of backing files -> have a look at the documentation
116
+ * Removed obsolete Extension Loader plugin
117
+ * Fixed bugs
118
+
119
+
120
+ h3(#news-2005-03-17). 17.03.2005 - webgen 0.3.2
121
+
122
+
123
+ Bug fix release for bug #1637 and other bugs
124
+
125
+
126
+ h3(#news-2005-03-16). 16.03.2005 - webgen 0.3.1
127
+
128
+
129
+ Major changes:
130
+
131
+ * Better DefaultLayouter for image galleries
132
+ * Output names for page files now customizable (see {plugin: File/PageHandler})
133
+ * On-the-fly creation of thumbnails for images with RMagick
134
+ * New tags: {plugin: Tag/Sitemap}
135
+ * Tag @lang@ renamed, new name @langbar@!
136
+ * New parameters for @menu@ tag
137
+ * Automatic checking of HTML files on their validness
138
+ * Fixed bugs
139
+
140
+
141
+ h3(#news-2005-02-21). 21.02.2005 - webgen 0.3.0
142
+
143
+
144
+ Major changes:
145
+
146
+ * Textile, Markdown, RDOC and HTML as content format supported!!!
147
+ * New tags: {plugin: Tag/WikiLink}
148
+ * Improved plugin system
149
+ * On-the-fly creation of new tags
150
+ * Fixed bugs
151
+ * Improved online documentation: pages on file handlers and tags now show parameters and other
152
+ additional info
153
+ * Added comprehensive test suite
154
+ * and more...
@@ -0,0 +1,10 @@
1
+ --- content, textile
2
+ h1. General Information
3
+
4
+ <notextile>
5
+
6
+ {describe: <%= node['plugin'] %>}
7
+
8
+ {block: content}
9
+
10
+ </notextile>
@@ -0,0 +1,427 @@
1
+ #
2
+ #--
3
+ #
4
+ # $Id: cli.rb 579 2007-01-04 20:48:43Z thomas $
5
+ #
6
+ # webgen: template based static website generator
7
+ # Copyright (C) 2004 Thomas Leitner
8
+ #
9
+ # This program is free software; you can redistribute it and/or modify it under the terms of the GNU
10
+ # General Public License as published by the Free Software Foundation; either version 2 of the
11
+ # License, or (at your option) any later version.
12
+ #
13
+ # This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
14
+ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
+ # General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU General Public License along with this program; if not,
18
+ # write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
+ #
20
+ #++
21
+ #
22
+
23
+ require 'rbconfig'
24
+ require 'fileutils'
25
+ require 'cmdparse'
26
+ require 'webgen/website'
27
+
28
+ module Webgen
29
+
30
+ class Color
31
+
32
+ @@colors = {:bold => [0, 1], :green => [0, 32], :lblue => [1, 34], :lred => [1, 31], :reset => [0, 0]}
33
+
34
+ def self.colorify
35
+ @@colors.each do |color, values|
36
+ module_eval <<-EOF
37
+ def Color.#{color.to_s}( text = nil )
38
+ "\e[#{values[0]};#{values[1]}m" + (text.nil? ? '' : text + self.reset)
39
+ end
40
+ EOF
41
+ end
42
+ end
43
+
44
+ def self.method_missing( id, text = nil )
45
+ text.to_s
46
+ end
47
+
48
+ end
49
+
50
+
51
+ class CliUtils
52
+
53
+ def self.format( content, indent = 0, width = 100 )
54
+ content ||= ''
55
+ return [content] if content.length + indent <= width
56
+ lines = []
57
+ while content.length + indent > width
58
+ index = content[0..(width-indent-1)].rindex(' ')
59
+ lines << (lines.empty? ? '' : ' '*indent) + content[0..index]
60
+ content = content[index+1..-1]
61
+ end
62
+ lines << ' '*indent + content unless content.strip.empty?
63
+ lines
64
+ end
65
+
66
+ def self.headline( text, indent = 2 )
67
+ ' '*indent + "#{Color.bold( text )}"
68
+ end
69
+
70
+ def self.section( text, ljustlength = 0, indent = 4, color = :green )
71
+ ' '*indent + "#{Color.send( color, text )}".ljust( ljustlength - indent + Color.send( color ).length + Color.reset.length )
72
+ end
73
+
74
+ def self.dirinfo_output( opts, name, dirinfo )
75
+ ljust = 15 + opts.summary_indent.length
76
+ opts.separator CliUtils.section( 'Name', ljust, opts.summary_indent.length + 2 ) + "#{Color.lred( name )}"
77
+
78
+ dirinfo.infos.sort.each do |name, value|
79
+ desc = CliUtils.format( value, ljust )
80
+ opts.separator CliUtils.section( name.capitalize, ljust, opts.summary_indent.length + 2 ) + desc.shift
81
+ desc.each {|line| opts.separator line}
82
+ end
83
+ opts.separator ''
84
+ end
85
+
86
+ end
87
+
88
+
89
+ class CreateCommand < CmdParse::Command
90
+
91
+ def initialize
92
+ super( 'create', false )
93
+ self.short_desc = "Creates the basic directories and files for webgen."
94
+ self.description = CliUtils.format( "\nIf the global verbosity level is set to 0 or 1, the created files are listed." )
95
+ self.options = CmdParse::OptionParserWrapper.new do |opts|
96
+ opts.separator "Options:"
97
+ opts.on( '-t', '--template TEMPLATE', Webgen::WebSiteTemplate.entries.keys, 'Specify the template which should be used' ) {|@template|}
98
+ opts.on( '-s', '--style STYLE', Webgen::WebSiteStyle.entries.keys, 'Specify the style which should be used' ) {|@style|}
99
+ opts.separator ""
100
+ opts.separator "Arguments:"
101
+ opts.separator opts.summary_indent + "DIR: the base directory for the website"
102
+ opts.separator ""
103
+ opts.separator "Available templates and styles:"
104
+ opts.separator ""
105
+ opts.separator opts.summary_indent + "#{Color.bold( 'Templates' )}"
106
+ Webgen::WebSiteTemplate.entries.sort.each {|name, entry| CliUtils.dirinfo_output( opts, name, entry ) }
107
+ opts.separator opts.summary_indent + "#{Color.bold( 'Styles' )}"
108
+ Webgen::WebSiteStyle.entries.sort.each {|name, entry| CliUtils.dirinfo_output( opts, name, entry ) }
109
+ end
110
+ @template = 'default'
111
+ @style = 'default'
112
+ end
113
+
114
+ def usage
115
+ "Usage: #{commandparser.program_name} [global options] create [options] DIR"
116
+ end
117
+
118
+ def execute( args )
119
+ if args.length == 0
120
+ raise OptionParser::MissingArgument.new( 'DIR' )
121
+ else
122
+ files = Webgen::WebSite.create_website( args[0], @template, @style )
123
+ if (0..1) === commandparser.verbosity
124
+ puts "The following files were created:"
125
+ puts files.collect {|f| "- " + f }.join("\n")
126
+ end
127
+ end
128
+ end
129
+
130
+ end
131
+
132
+ class UseCommand < CmdParse::Command
133
+
134
+ def initialize( cmdparser )
135
+ super( 'use', true )
136
+ self.short_desc = "Changes the used website or gallery styles"
137
+
138
+ @force = false
139
+ self.options = CmdParse::OptionParserWrapper.new do |opts|
140
+ opts.separator "Options:"
141
+ opts.on( '-f', '--[no-]force', 'If specified, existing files are overwritten without asking.' ) {|@force|}
142
+ end
143
+
144
+ # Use website style command.
145
+ useWebsiteStyle = CmdParse::Command.new( 'website_style', false )
146
+ useWebsiteStyle.short_desc = "Changes the used website style"
147
+ useWebsiteStyle.description =
148
+ CliUtils.format("\nCopies the style files for the website style STYLE to the website " +
149
+ "directory defined by the global directory option, overwritting existing " +
150
+ "files. If the global verbosity level is set to 0 or 1, the copied files are listed.")
151
+ useWebsiteStyle.options = CmdParse::OptionParserWrapper.new do |opts|
152
+ opts.separator "Available styles:"
153
+ opts.separator ""
154
+ Webgen::WebSiteStyle.entries.sort.each {|name, entry| CliUtils.dirinfo_output( opts, name, entry ) }
155
+ end
156
+ def useWebsiteStyle.usage
157
+ "Usage: #{commandparser.program_name} [global options] use website_style STYLE"
158
+ end
159
+ useWebsiteStyle.set_execution_block do |args|
160
+ if args.length == 0
161
+ raise OptionParser::MissingArgument.new( 'STYLE' )
162
+ else
163
+ if @force || ask_overwrite
164
+ files = Webgen::WebSite.use_website_style( cmdparser.directory, args[0] )
165
+ if (0..1) === cmdparser.verbosity
166
+ puts "The following files were created or overwritten:"
167
+ puts files.collect {|f| "- " + f }.join("\n")
168
+ end
169
+ end
170
+ end
171
+ end
172
+ self.add_command( useWebsiteStyle )
173
+
174
+ # Use gallery style command.
175
+ useGalleryStyle = CmdParse::Command.new( 'gallery_style', false )
176
+ useGalleryStyle.short_desc = "Changes the used gallery style"
177
+ useGalleryStyle.description =
178
+ CliUtils.format("\nCopies the gallery templates for the gallery style STYLE to the website " +
179
+ "directory defined by the global directory option, overwritting existing files. " +
180
+ "If the global verbosity level is set to 0 or 1, the copied files are listed.")
181
+ useGalleryStyle.options = CmdParse::OptionParserWrapper.new do |opts|
182
+ opts.separator "Available styles:"
183
+ opts.separator ""
184
+ Webgen::GalleryStyle.entries.sort.each {|name, entry| CliUtils.dirinfo_output( opts, name, entry ) }
185
+ end
186
+ def useGalleryStyle.usage
187
+ "Usage: #{commandparser.program_name} [global options] use gallery_style STYLE"
188
+ end
189
+ useGalleryStyle.set_execution_block do |args|
190
+ if args.length == 0
191
+ raise OptionParser::MissingArgument.new( 'STYLE' )
192
+ else
193
+ if @force || ask_overwrite
194
+ files = Webgen::WebSite.use_gallery_style( cmdparser.directory, args[0] )
195
+ if (0..1) === cmdparser.verbosity
196
+ puts "The following files were created or overwritten:"
197
+ puts files.collect {|f| "- " + f }.join("\n")
198
+ end
199
+ end
200
+ end
201
+ end
202
+ self.add_command( useGalleryStyle )
203
+ end
204
+
205
+ #######
206
+ private
207
+ #######
208
+
209
+ def ask_overwrite
210
+ printf "Existing files may get overwritten, procede (yes/no)? : "
211
+ $stdin.gets =~ /y|yes/
212
+ end
213
+
214
+ end
215
+
216
+
217
+ class ShowCommand < CmdParse::Command
218
+
219
+ def initialize( cmdparser )
220
+ super( 'show', true )
221
+ self.short_desc = "Shows various information"
222
+
223
+ # Show plugins command
224
+ showPlugins = CmdParse::Command.new( 'plugins', false )
225
+ showPlugins.short_desc = "Shows the available plugins"
226
+ showPlugins.set_execution_block do |args|
227
+ puts "List of loaded plugins:"
228
+ headers = Hash.new {|h,k| h[k] = (k.nil? ? "Other Plugins" : k.gsub(/([A-Z][a-z])/, ' \1').strip) }
229
+
230
+ header = ''
231
+ cmdparser.website.manager.plugin_classes.sort {|a, b| a.plugin_name <=> b.plugin_name }.each do |plugin|
232
+ newHeader = headers[plugin.plugin_name[/^.*?(?=\/)/]]
233
+ unless newHeader == header
234
+ puts "\n" + CliUtils.headline( newHeader )
235
+ header = newHeader
236
+ end
237
+ puts CliUtils.section( plugin.plugin_name[/\w+$/], 33 ) + CliUtils.format( plugin.config.infos[:summary], 33 ).join("\n")
238
+ end
239
+ end
240
+ self.add_command( showPlugins )
241
+
242
+ # Show config command
243
+ showConfig = CmdParse::Command.new( 'config', false )
244
+ showConfig.short_desc = "Shows information like the parameters for all or the matched plugins"
245
+ showConfig.description =
246
+ CliUtils.format( "\nIf no argument is provided, all plugins and their information are listed. If " +
247
+ "an argument is specified, all plugin names that match the argument are listed." ).join("\n")
248
+ showConfig.set_execution_block do |args|
249
+ puts "List of plugin informations:"
250
+ puts
251
+
252
+ cmdparser.website.manager.plugins.sort {|a, b| a[0] <=> b[0] }.each do |name, plugin|
253
+ next if args.length > 0 && /#{args[0]}/i !~ name
254
+
255
+ config = plugin.class.config
256
+ puts CliUtils.headline( name )
257
+ ljust = 25
258
+
259
+ puts CliUtils.section( 'Summary', ljust ) + CliUtils.format( config.infos[:summary], ljust ).join("\n") if config.infos[:summary]
260
+ puts CliUtils.section( 'Author', ljust ) + CliUtils.format( config.infos[:author], ljust ).join("\n") if config.infos[:author]
261
+ puts CliUtils.section( 'Description', ljust ) + CliUtils.format( config.infos[:description], ljust ).join("\n") if config.infos[:description]
262
+ puts CliUtils.section( 'Tag names', ljust ) + plugin.tags.join(", ") if plugin.respond_to?( :tags )
263
+ puts CliUtils.section( 'Handles paths', ljust ) + plugin.path_patterns.collect {|r,f| f}.inspect if plugin.respond_to?( :path_patterns )
264
+ puts CliUtils.section( 'Dependencies', ljust ) + config.dependencies.join(', ') if !config.dependencies.empty?
265
+
266
+ if !config.params.empty?
267
+ puts "\n" + CliUtils.section( 'Parameters' )
268
+ config.params.sort.each do |name, item|
269
+ print "\n" + CliUtils.section( 'Parameter', ljust, 6 )
270
+ puts Color.lred( item.name ) + ": " + Color.lblue( plugin.instance_eval {param( name )}.inspect ) +
271
+ " (" + item.default.inspect + ")"
272
+ puts CliUtils.section( 'Description', ljust, 6 ) + CliUtils.format( item.description, ljust ).join("\n")
273
+ end
274
+ end
275
+
276
+ otherinfos = config.infos.select {|k,v| ![:name, :author, :summary, :description, :tags, :path_patterns].include?( k ) }
277
+ puts "\n" +CliUtils.section( 'Other Information' ) unless otherinfos.empty?
278
+ otherinfos.each {|name, value| puts CliUtils.section( name.to_s.tr('_', ' '), ljust, 6 ) + value.inspect }
279
+
280
+ puts
281
+ end
282
+ end
283
+ self.add_command( showConfig )
284
+ end
285
+
286
+ end
287
+
288
+
289
+ class CheckCommand < CmdParse::Command
290
+
291
+ def initialize( cmdparser )
292
+ super( 'check', true )
293
+ self.short_desc = "Checks things like validity of the config file or the availability of optional libraries"
294
+
295
+ # Check configuration file command
296
+ checkConfig = CmdParse::Command.new( 'config', false )
297
+ checkConfig.short_desc = "Checks the validity of the configuration and outputs the used options"
298
+ checkConfig.set_execution_block do |args|
299
+ begin
300
+ if File.exists?( File.join( cmdparser.directory, 'config.yaml' ) )
301
+ print CliUtils.section( "Checking configuration file syntax...", 50, 0, :bold )
302
+ config_file = ConfigurationFile.new( File.join( cmdparser.directory, 'config.yaml' ) )
303
+ puts Color.green( 'OK' )
304
+
305
+ puts CliUtils.section( "Checking parameters...", 0, 0, :bold )
306
+ config_file.config.each do |plugin_name, params|
307
+ params.each do |param_name, value|
308
+ print CliUtils.section( "#{plugin_name}:#{param_name}", 50, 2, :reset )
309
+ if cmdparser.website.manager.plugin_class_for_name( plugin_name ).nil?
310
+ puts Color.lred( 'NOT OK' ) + ': no such plugin'
311
+ else
312
+ begin
313
+ cmdparser.website.manager.param_for_plugin( plugin_name, param_name )
314
+ puts Color.green( 'OK' )
315
+ rescue PluginParamNotFound => e
316
+ puts Color.lred( 'NOT OK' ) + ': no such parameter'
317
+ end
318
+ end
319
+ end
320
+ end
321
+ else
322
+ print CliUtils.section( "No configuration file found!", 50, 0, :bold )
323
+ end
324
+ rescue ConfigurationFileInvalid => e
325
+ puts Color.lred( 'NOT OK' ) + ': ' + e.message
326
+ end
327
+ end
328
+ self.add_command( checkConfig, true )
329
+
330
+ # Check optional libraries
331
+ checkLibs = CmdParse::Command.new( 'libs', false )
332
+ checkLibs.short_desc = "Checks the availability of optional libraries used by plugins"
333
+ checkLibs.set_execution_block do |args|
334
+ puts CliUtils.format( "List of optional libraries (the info line specifies which functionality will be available " +
335
+ "if the needed gems are installed):" ).join("\n")
336
+ puts
337
+
338
+ cmdparser.website.manager.plugin_loaders.each do |loader|
339
+ loader.optional_parts.sort.each do |name, options|
340
+ puts CliUtils.headline( name )
341
+ puts CliUtils.section( 'Info', 25 ) + CliUtils.format( options[:info], 25 ).join("\n")
342
+ puts CliUtils.section( 'Needed gems', 25 ) + options[:needed_gems].join( ', ' )
343
+ puts CliUtils.section( 'Loaded', 25 ) + ( options[:loaded] ? Color.green( 'yes' ) : Color.lred( 'no' ) )
344
+ puts CliUtils.section( 'Error message', 25 ) + CliUtils.format( options[:error_msg], 25 ).join("\n") unless options[:loaded]
345
+ puts
346
+ end
347
+ end
348
+ end
349
+ self.add_command( checkLibs )
350
+ end
351
+
352
+ end
353
+
354
+
355
+ class CommandParser < CmdParse::CommandParser
356
+
357
+ VERBOSITY_UNUSED = -1
358
+
359
+ attr_reader :directory
360
+ attr_reader :website
361
+ attr_reader :verbosity
362
+ attr_reader :config_file
363
+
364
+ def initialize
365
+ super( true )
366
+ @directory = Dir.pwd
367
+ @verbosity = VERBOSITY_UNUSED
368
+
369
+ self.program_name = "webgen"
370
+ self.program_version = Webgen::VERSION
371
+ self.options = CmdParse::OptionParserWrapper.new do |opts|
372
+ opts.separator "Global options:"
373
+ opts.on( "--directory DIR", "-d", String, "The website directory, if none specified, current directory is used." ) {|@directory|}
374
+ opts.on( "--verbosity LEVEL", "-V", Integer, "The verbosity level (0-3)" ) {|@verbosity|}
375
+ end
376
+
377
+ # Run command
378
+ run = CmdParse::Command.new( 'run', false )
379
+ run.short_desc = "Runs webgen, ie. generates the HTML files"
380
+ run.description = CliUtils.format("\nWith no arguments, renders the whole site. If file names are " +
381
+ "specified (don't include the path/to/src/ part), only those are rendered." )
382
+ run.set_execution_block do |args|
383
+ @website.render( args )
384
+ end
385
+ self.add_command( run, true )
386
+
387
+ self.add_command( CreateCommand.new )
388
+ self.add_command( ShowCommand.new( self ) )
389
+ self.add_command( UseCommand.new( self ) )
390
+ self.add_command( CmdParse::HelpCommand.new )
391
+ self.add_command( CmdParse::VersionCommand.new )
392
+ self.add_command( CheckCommand.new( self ) )
393
+ end
394
+
395
+ def param_for_plugin( plugin_name, param )
396
+ if [plugin_name, param] == ['Core/Configuration', 'loggerLevel'] && @verbosity != VERBOSITY_UNUSED
397
+ @verbosity
398
+ elsif @config_file
399
+ @config_file.param_for_plugin( plugin_name, param )
400
+ else
401
+ Webgen::PluginParamValueNotFound
402
+ end
403
+ end
404
+
405
+ def parse( argv = ARGV )
406
+ super do |level, cmd_name|
407
+ if level == 0
408
+ @config_file = Webgen::WebSite.load_config_file( @directory )
409
+ @website = Webgen::WebSite.new( @directory, self )
410
+ @website.manager.init
411
+ @website.manager.plugins.
412
+ each {|name,plugin| self.add_command( plugin ) if plugin.kind_of?( Webgen::CommandPlugin ) }
413
+ end
414
+ end
415
+ end
416
+
417
+ end
418
+
419
+
420
+ # Main program for the webgen CLI.
421
+ def self.cli_main
422
+ Color.colorify if $stdout.isatty && !Config::CONFIG['arch'].include?( 'mswin32' )
423
+ cmdparser = CommandParser.new
424
+ cmdparser.parse
425
+ end
426
+
427
+ end