webgen 0.3.6 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ChangeLog +1523 -97
- data/Rakefile +11 -24
- data/TODO +22 -9
- data/VERSION +1 -1
- data/bin/webgen +2 -2
- data/bin/webgen-gallery-editor +654 -0
- data/bin/webgen-gui +10 -0
- data/data/webgen/data/ISO-639-2_values_8bits.txt +492 -0
- data/data/webgen/gallery-creator/default.png +0 -0
- data/data/webgen/icon_mapping.yaml +27 -0
- data/data/webgen/resources/emoticons/bigeyes/angry.png +0 -0
- data/data/webgen/resources/emoticons/bigeyes/cool.png +0 -0
- data/data/webgen/resources/emoticons/bigeyes/cry.png +0 -0
- data/data/webgen/resources/emoticons/bigeyes/drunk.png +0 -0
- data/data/webgen/resources/emoticons/bigeyes/lol.png +0 -0
- data/data/webgen/resources/emoticons/bigeyes/oops.png +0 -0
- data/data/webgen/resources/emoticons/bigeyes/sad.png +0 -0
- data/data/webgen/resources/emoticons/bigeyes/sleep.png +0 -0
- data/data/webgen/resources/emoticons/bigeyes/smile.png +0 -0
- data/data/webgen/resources/emoticons/bigeyes/tongue.png +0 -0
- data/data/webgen/resources/emoticons/bigeyes/wink.png +0 -0
- data/data/webgen/resources/emoticons/crystal/angry.png +0 -0
- data/data/webgen/resources/emoticons/crystal/cool.png +0 -0
- data/data/webgen/resources/emoticons/crystal/cry.png +0 -0
- data/data/webgen/resources/emoticons/crystal/drunk.png +0 -0
- data/data/webgen/resources/emoticons/crystal/lol.png +0 -0
- data/data/webgen/resources/emoticons/crystal/oops.png +0 -0
- data/data/webgen/resources/emoticons/crystal/sad.png +0 -0
- data/data/webgen/resources/emoticons/crystal/sleep.png +0 -0
- data/data/webgen/resources/emoticons/crystal/smile.png +0 -0
- data/data/webgen/resources/emoticons/crystal/tongue.png +0 -0
- data/data/webgen/resources/emoticons/crystal/wink.png +0 -0
- data/data/webgen/resources/emoticons/cyclops/angry.png +0 -0
- data/data/webgen/resources/emoticons/cyclops/cool.png +0 -0
- data/data/webgen/resources/emoticons/cyclops/cry.png +0 -0
- data/data/webgen/resources/emoticons/cyclops/drunk.png +0 -0
- data/data/webgen/resources/emoticons/cyclops/lol.png +0 -0
- data/data/webgen/resources/emoticons/cyclops/oops.png +0 -0
- data/data/webgen/resources/emoticons/cyclops/sad.png +0 -0
- data/data/webgen/resources/emoticons/cyclops/sleep.png +0 -0
- data/data/webgen/resources/emoticons/cyclops/smile.png +0 -0
- data/data/webgen/resources/emoticons/cyclops/tongue.png +0 -0
- data/data/webgen/resources/emoticons/cyclops/wink.png +0 -0
- data/data/webgen/resources/emoticons/glass/angry.png +0 -0
- data/data/webgen/resources/emoticons/glass/cool.png +0 -0
- data/data/webgen/resources/emoticons/glass/cry.png +0 -0
- data/data/webgen/resources/emoticons/glass/drunk.png +0 -0
- data/data/webgen/resources/emoticons/glass/lol.png +0 -0
- data/data/webgen/resources/emoticons/glass/oops.png +0 -0
- data/data/webgen/resources/emoticons/glass/sad.png +0 -0
- data/data/webgen/resources/emoticons/glass/sleep.png +0 -0
- data/data/webgen/resources/emoticons/glass/smile.png +0 -0
- data/data/webgen/resources/emoticons/glass/tongue.png +0 -0
- data/data/webgen/resources/emoticons/glass/wink.png +0 -0
- data/data/webgen/resources/emoticons/icqstyle/angry.png +0 -0
- data/data/webgen/resources/emoticons/icqstyle/cool.png +0 -0
- data/data/webgen/resources/emoticons/icqstyle/cry.png +0 -0
- data/data/webgen/resources/emoticons/icqstyle/drunk.png +0 -0
- data/data/webgen/resources/emoticons/icqstyle/lol.png +0 -0
- data/data/webgen/resources/emoticons/icqstyle/oops.png +0 -0
- data/data/webgen/resources/emoticons/icqstyle/sad.png +0 -0
- data/data/webgen/resources/emoticons/icqstyle/sleep.png +0 -0
- data/data/webgen/resources/emoticons/icqstyle/smile.png +0 -0
- data/data/webgen/resources/emoticons/icqstyle/tongue.png +0 -0
- data/data/webgen/resources/emoticons/icqstyle/wink.png +0 -0
- data/data/webgen/resources/emoticons/matrix/angry.gif +0 -0
- data/data/webgen/resources/emoticons/matrix/cool.gif +0 -0
- data/data/webgen/resources/emoticons/matrix/cry.gif +0 -0
- data/data/webgen/resources/emoticons/matrix/drunk.gif +0 -0
- data/data/webgen/resources/emoticons/matrix/lol.gif +0 -0
- data/data/webgen/resources/emoticons/matrix/oops.gif +0 -0
- data/data/webgen/resources/emoticons/matrix/sad.gif +0 -0
- data/data/webgen/resources/emoticons/matrix/sleep.gif +0 -0
- data/data/webgen/resources/emoticons/matrix/smile.gif +0 -0
- data/data/webgen/resources/emoticons/matrix/tongue.gif +0 -0
- data/data/webgen/resources/emoticons/matrix/wink.gif +0 -0
- data/data/webgen/resources/emoticons/smellies/angry.gif +0 -0
- data/data/webgen/resources/emoticons/smellies/cool.gif +0 -0
- data/data/webgen/resources/emoticons/smellies/cry.gif +0 -0
- data/data/webgen/resources/emoticons/smellies/drunk.gif +0 -0
- data/data/webgen/resources/emoticons/smellies/lol.gif +0 -0
- data/data/webgen/resources/emoticons/smellies/oops.gif +0 -0
- data/data/webgen/resources/emoticons/smellies/sad.gif +0 -0
- data/data/webgen/resources/emoticons/smellies/sleep.gif +0 -0
- data/data/webgen/resources/emoticons/smellies/smile.gif +0 -0
- data/data/webgen/resources/emoticons/smellies/tongue.gif +0 -0
- data/data/webgen/resources/emoticons/smellies/wink.gif +0 -0
- data/data/webgen/resources/icons/compressed.png +0 -0
- data/data/webgen/resources/icons/document.png +0 -0
- data/data/webgen/resources/icons/download.png +0 -0
- data/data/webgen/resources/icons/image.png +0 -0
- data/data/webgen/resources/icons/linux.png +0 -0
- data/data/webgen/resources/icons/mac.png +0 -0
- data/data/webgen/resources/icons/pdf.png +0 -0
- data/data/webgen/resources/icons/penguin.png +0 -0
- data/data/webgen/resources/icons/quicktime.png +0 -0
- data/data/webgen/resources/icons/real.png +0 -0
- data/data/webgen/resources/icons/rpm.png +0 -0
- data/data/webgen/resources/icons/sound.png +0 -0
- data/data/webgen/resources/icons/source.png +0 -0
- data/data/webgen/resources/icons/spreadsheet.png +0 -0
- data/data/webgen/resources/icons/text.png +0 -0
- data/data/webgen/resources/icons/vcard.png +0 -0
- data/data/webgen/resources/icons/video.png +0 -0
- data/data/webgen/resources/icons/win.png +0 -0
- data/data/webgen/{images → resources/images}/generated_by_webgen.png +0 -0
- data/data/webgen/{images → resources/images}/valid-css.gif +0 -0
- data/data/webgen/{images → resources/images}/valid-xhtml11.png +0 -0
- data/data/webgen/{images → resources/images}/webgen_logo.png +0 -0
- data/data/webgen/{example/src → website_styles/default}/default.css +0 -0
- data/data/webgen/{example/src → website_styles/default}/default.template +2 -2
- data/data/webgen/website_templates/default/README +6 -0
- data/data/webgen/{example → website_templates/default}/config.yaml +0 -0
- data/data/webgen/{example → website_templates/default}/src/index.page +0 -0
- data/data/webgen/website_templates/personal_hp/README +6 -0
- data/data/webgen/website_templates/personal_hp/src/about.page +12 -0
- data/data/webgen/website_templates/personal_hp/src/index.page +9 -0
- data/data/webgen/website_templates/personal_hp/src/links.page +22 -0
- data/data/webgen/website_templates/personal_hp/src/projects.page +20 -0
- data/data/webgen/website_templates/project/README +7 -0
- data/data/webgen/website_templates/project/src/about.page +12 -0
- data/data/webgen/website_templates/project/src/download.page +15 -0
- data/data/webgen/website_templates/project/src/features.page +8 -0
- data/data/webgen/website_templates/project/src/index.page +9 -0
- data/data/webgen/website_templates/project/src/screenshots.page +18 -0
- data/doc/config.yaml +3 -0
- data/doc/plugin/clidesc.rb +18 -7
- data/doc/plugin/emoticon.rb +29 -0
- data/doc/plugin/extension.rb +15 -16
- data/doc/plugin/listpluginparameters.rb +39 -0
- data/doc/plugin/resources.rb +4 -4
- data/doc/plugin/source.rb +21 -0
- data/doc/src/default.css +7 -4
- data/doc/src/default.template +4 -2
- data/doc/src/documentation/cli.page +1 -1
- data/doc/src/documentation/extending_webgen.page +102 -0
- data/doc/src/documentation/gettingstarted.page +3 -6
- data/doc/src/documentation/index.page +1 -1
- data/doc/src/documentation/plugins/{contenthandler → contenthandlers}/html.page +0 -0
- data/doc/src/documentation/plugins/{contenthandler → contenthandlers}/index.page +0 -0
- data/doc/src/documentation/plugins/{contenthandler → contenthandlers}/markdown.page +0 -0
- data/doc/src/documentation/plugins/{contenthandler → contenthandlers}/rdoc.page +0 -0
- data/doc/src/documentation/plugins/{contenthandler → contenthandlers}/textile.page +0 -0
- data/doc/src/documentation/plugins/{system → coreplugins}/configuration.page +0 -0
- data/doc/src/documentation/plugins/coreplugins/index.page +7 -0
- data/doc/src/documentation/plugins/{system → coreplugins}/logging.page +0 -0
- data/doc/src/documentation/plugins/{resourcemanager.page → coreplugins/resourcemanager.page} +5 -1
- data/doc/src/documentation/plugins/{filehandler → filehandlers}/backing.page +1 -1
- data/doc/src/documentation/plugins/{filehandler → filehandlers}/copy.page +1 -1
- data/doc/src/documentation/plugins/{filehandler/directory.page → filehandlers/directoryhandler.page} +11 -2
- data/doc/src/documentation/plugins/{filehandler/galleryhandler.page → filehandlers/gallery.page} +20 -13
- data/doc/src/documentation/plugins/{filehandler → filehandlers}/index.page +0 -0
- data/doc/src/documentation/plugins/{filehandler/pagehandler.page → filehandlers/page.page} +6 -4
- data/doc/src/documentation/plugins/{filehandler → filehandlers}/template.page +0 -0
- data/doc/src/documentation/plugins/{gallerylayouter → gallerylayouters}/index.page +7 -3
- data/doc/src/documentation/plugins/{htmlvalidator → htmlvalidators}/index.page +0 -0
- data/doc/src/documentation/plugins/{htmlvalidator → htmlvalidators}/xmllint.page +0 -0
- data/doc/src/documentation/plugins/index.page +4 -0
- data/doc/src/documentation/plugins/menustyles/{horizontal-dropdown.page → horizontaldropdown.page} +0 -0
- data/doc/src/documentation/plugins/menustyles/{vertical-dropdown.page → verticaldropdown.page} +1 -1
- data/doc/src/documentation/plugins/miscplugins/index.page +7 -0
- data/doc/src/documentation/plugins/miscplugins/smileyreplacer.page +38 -0
- data/doc/src/documentation/plugins/tags/breadcrumbtrail.page +20 -0
- data/doc/src/documentation/plugins/tags/download.page +23 -0
- data/doc/src/documentation/plugins/tags/resource.page +1 -1
- data/doc/src/documentation/plugins/tags/sitemap.page +1 -2
- data/doc/src/documentation/references/index.page +8 -0
- data/doc/src/documentation/{meta_info_reference.page → references/meta_info_reference.page} +1 -0
- data/doc/src/documentation/references/parameter_reference.page +12 -0
- data/doc/src/documentation/webgen_gallery_editor.page +82 -0
- data/doc/src/download.page +2 -2
- data/doc/src/features.page +3 -2
- data/doc/src/images/screenshots/wge-image.png +0 -0
- data/doc/src/images/screenshots/wge-layout-preview.png +0 -0
- data/doc/src/images/screenshots/wge-main-disabled.png +0 -0
- data/doc/src/images/screenshots/wge-main.png +0 -0
- data/doc/src/index.page +30 -11
- data/doc/src/meta.info +7 -7
- data/doc/src/screenshots.gallery +33 -0
- data/install.rb +1 -1
- data/lib/webgen.rb +275 -0
- data/lib/webgen/composite.rb +1 -1
- data/lib/webgen/gui/common.rb +38 -0
- data/lib/webgen/gui/main.rb +219 -0
- data/lib/webgen/gui/new_website_dlg.rb +125 -0
- data/lib/webgen/listener.rb +1 -1
- data/lib/webgen/node.rb +4 -2
- data/lib/webgen/plugin.rb +167 -100
- data/lib/webgen/plugins/{contenthandler/defaultcontenthandler.rb → contenthandlers/default.rb} +1 -1
- data/lib/webgen/plugins/{contenthandler → contenthandlers}/html.rb +2 -2
- data/lib/webgen/plugins/{contenthandler → contenthandlers}/markdown.rb +2 -2
- data/lib/webgen/plugins/{contenthandler → contenthandlers}/rdoc.rb +2 -2
- data/lib/webgen/plugins/{contenthandler → contenthandlers}/textile.rb +2 -2
- data/lib/webgen/{configuration.rb → plugins/coreplugins/configuration.rb} +34 -14
- data/lib/webgen/{logging.rb → plugins/coreplugins/logging.rb} +4 -4
- data/lib/webgen/plugins/{resourcemanager.rb → coreplugins/resourcemanager.rb} +44 -22
- data/lib/webgen/plugins/{filehandler → filehandlers}/backing.rb +11 -11
- data/lib/webgen/plugins/{filehandler/filecopy.rb → filehandlers/copy.rb} +3 -3
- data/lib/webgen/plugins/{filehandler → filehandlers}/directory.rb +15 -10
- data/lib/webgen/plugins/{filehandler → filehandlers}/filehandler.rb +9 -7
- data/lib/webgen/plugins/{filehandler/picturegallery.rb → filehandlers/gallery.rb} +35 -28
- data/lib/webgen/plugins/{filehandler → filehandlers}/page.rb +30 -15
- data/lib/webgen/plugins/{filehandler → filehandlers}/template.rb +3 -3
- data/lib/webgen/plugins/{gallerylayouter/defaultgallerylayouter.rb → gallerylayouters/default.rb} +11 -11
- data/lib/webgen/plugins/{htmlvalidator/defaulthtmlvalidator.rb → htmlvalidators/default.rb} +1 -1
- data/lib/webgen/plugins/{htmlvalidator → htmlvalidators}/xmllint.rb +2 -2
- data/lib/webgen/plugins/menustyles/{defaultmenustyle.rb → default.rb} +2 -2
- data/lib/webgen/plugins/menustyles/horizontal.rb +2 -2
- data/lib/webgen/plugins/menustyles/horizontal_dropdown.rb +2 -2
- data/lib/webgen/plugins/menustyles/partial.rb +2 -2
- data/lib/webgen/plugins/menustyles/vertical.rb +2 -2
- data/lib/webgen/plugins/menustyles/vertical_dropdown.rb +2 -2
- data/lib/webgen/plugins/miscplugins/smileyreplacer.rb +84 -0
- data/lib/webgen/plugins/{treewalker.rb → miscplugins/treewalker.rb} +1 -1
- data/lib/webgen/plugins/tags/{navbar.rb → breadcrumbtrail.rb} +5 -9
- data/lib/webgen/plugins/tags/date.rb +2 -6
- data/lib/webgen/plugins/tags/download.rb +155 -0
- data/lib/webgen/plugins/tags/executecommand.rb +2 -6
- data/lib/webgen/plugins/tags/includefile.rb +4 -8
- data/lib/webgen/plugins/tags/langbar.rb +2 -6
- data/lib/webgen/plugins/tags/menu.rb +2 -7
- data/lib/webgen/plugins/tags/meta.rb +2 -6
- data/lib/webgen/plugins/tags/relocatable.rb +2 -6
- data/lib/webgen/plugins/tags/sitemap.rb +14 -10
- data/lib/webgen/plugins/tags/tags.rb +25 -18
- data/lib/webgen/plugins/tags/wikilink.rb +2 -6
- metadata +311 -195
- data/doc/src/design.gallery +0 -18
- data/doc/src/designs/curdesign.png +0 -0
- data/doc/src/designs/nostyle.png +0 -0
- data/doc/src/designs/old.png +0 -0
- data/doc/src/documentation/plugins/gallerylayouter/defaultlayouter.page +0 -12
- data/doc/src/documentation/plugins/system/index.page +0 -7
- data/doc/src/documentation/plugins/tags/navbar.page +0 -20
- data/lib/webgen/webgen.rb +0 -271
- data/testsite/config.yaml +0 -7
- data/testsite/src/bghack.png +0 -0
- data/testsite/src/bluecloth.page +0 -102
- data/testsite/src/default.css +0 -146
- data/testsite/src/default.template +0 -33
- data/testsite/src/home.en.page +0 -22
- data/testsite/src/home.page +0 -22
- data/testsite/src/images/bghack.png +0 -0
- data/testsite/src/index.page +0 -21
- data/testsite/src/meta.info +0 -12
- data/testsite/src/news.page +0 -20
- data/testsite/src/news_are_so-cool.de.page +0 -19
- data/testsite/src/noindex/noindex.page +0 -20
- data/testsite/src/pictures/index.page +0 -20
- data/testsite/src/projects.de.page +0 -11
- data/testsite/src/projects.es.page +0 -11
- data/testsite/src/projects.page +0 -17
- data/testsite/src/projects/00.index.de.page +0 -10
- data/testsite/src/projects/01.project2.page +0 -20
- data/testsite/src/projects/02.project1.page +0 -20
- data/testsite/src/projects/05.project3.page +0 -22
- data/testsite/src/projects/index.page +0 -20
- data/testsite/src/projects/subproj/index.page +0 -22
- data/testsite/src/projects/subproj/project3.page +0 -21
- data/testsite/src/rdoc.page +0 -12
- data/testsite/src/redcloth.page +0 -106
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/doc/src/index.page
CHANGED
|
@@ -18,18 +18,37 @@ list":http://rubyforge.org/mail/?group_id=296 available if you have any question
|
|
|
18
18
|
|
|
19
19
|
h2. News
|
|
20
20
|
|
|
21
|
-
<b
|
|
21
|
+
<b>27.11.2005 - webgen 0.3.7 released!!!</b>
|
|
22
|
+
|
|
23
|
+
Major changes:
|
|
24
|
+
|
|
25
|
+
* Now using cmdparse version 2.0.0!
|
|
26
|
+
* %{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!
|
|
27
|
+
* %{color:red}Attention%: Many documentation and library files have been renamed for better consistency! Custom plugins may have to be adapted!
|
|
28
|
+
* <b>New <a href="{relocatable: /documentation/webgen_gallery_editor.page}">application</a></b> for managing image galleries (only alpha quality currently!)
|
|
29
|
+
* 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>
|
|
30
|
+
* <a href="{relocatable: documentation/extending_webgen.page}">Site specific commands</a> (used in command line processing) can now be used
|
|
31
|
+
* New plugin <a href="{relocatable: documentation/plugins/tags/download.page}">Download Tag</a> for nice download links
|
|
32
|
+
* New parameters: <a href="{relocatable: documentation/plugins/filehandlers/page.page}">PageFileHandler:defaultPageMetaData</a>, <a href="{relocatable: documentation/plugins/tags/sitemap.page}">SitemapTag:honorInMenu</a>
|
|
33
|
+
* Removed parameters: PageFileHandler:useERB, PageFileHandler:defaultContentFormat
|
|
34
|
+
* Renamed tag <b>navbar</b> to <b>breadcrumbTrail</b>
|
|
35
|
+
* Images in image galleries can now be ordered by specifying the @orderInfo@ meta information
|
|
36
|
+
* 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
|
|
37
|
+
* Languages can now be specified using 2-char ISO-639-1 codes or 3-char ISO-639-2 codes
|
|
38
|
+
* Now there is a link (next to the wiki link) to the source of each page unless the page was programmatically generated.
|
|
39
|
+
|
|
40
|
+
<b>24.06.2005 - webgen 0.3.5 released!!!</b>
|
|
22
41
|
|
|
23
42
|
Major changes:
|
|
24
43
|
|
|
25
44
|
* Now using cmdparse version 1.0.3!
|
|
26
45
|
* New CLI command "clean" for deleting the generated or all files from the output directory
|
|
27
46
|
* Restructured menu tag -> five different menu styles now available (see <a href="{relocatable: documentation/plugins/menustyles}">Menu Styles</a>)
|
|
28
|
-
* New plugin <a href="{relocatable: documentation/plugins/resourcemanager.page}">ResourceManager</a> for defining resources
|
|
47
|
+
* New plugin <a href="{relocatable: documentation/plugins/coreplugins/resourcemanager.page}">ResourceManager</a> for defining resources
|
|
29
48
|
* New plugin <a href="{relocatable: documentation/plugins/tags/resource.page}">Resource Tag</a> for accessing resources
|
|
30
|
-
* Pages files can now be referenced in @relocatable@ tag and backing files with a standardified name (see <a href="{relocatable: documentation/plugins/
|
|
49
|
+
* 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
|
|
31
50
|
* New parameters: <a href="{relocatable: documentation/plugins/tags/langbar.page}">LangbarTag:showOwnLang</a>
|
|
32
|
-
* Changed paramters: <a href="{relocatable: documentation/plugins/
|
|
51
|
+
* Changed paramters: <a href="{relocatable: documentation/plugins/filehandlers/page.page}">PageFileHandler:validator</a> (now deactivated by default)
|
|
33
52
|
* Fixed bugs
|
|
34
53
|
|
|
35
54
|
<b>12.05.2005 - webgen 0.3.4 released!!!</b>
|
|
@@ -37,11 +56,11 @@ Major changes:
|
|
|
37
56
|
Major changes:
|
|
38
57
|
|
|
39
58
|
* FileHandler now uses path patterns and/or extensions for determining which files to process !
|
|
40
|
-
* ERB (embedded ruby) can now be used in templates and page files (see <a href="{relocatable: documentation/plugins/
|
|
59
|
+
* ERB (embedded ruby) can now be used in templates and page files (see <a href="{relocatable: documentation/plugins/filehandlers/page.page}">PageFileHandler</a>)!
|
|
41
60
|
* Relocatable tag now accepts complex URIs (URIs with query and fragment part, absolute URIs)
|
|
42
61
|
* 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!!!
|
|
43
|
-
* New parameters: <a href="{relocatable: documentation/plugins/
|
|
44
|
-
* Changed parameters: <a href="{relocatable: documentation/plugins/
|
|
62
|
+
* New parameters: <a href="{relocatable: documentation/plugins/filehandlers/page.page}">PageFileHandler:useERB</a>
|
|
63
|
+
* Changed parameters: <a href="{relocatable: documentation/plugins/filehandlers}">FileHandler:ignorePaths</a>, <a href="{relocatable: documentation/plugins/filehandlers/copy.page}">CopyFileHandler:paths</a>
|
|
45
64
|
* New page describing meta information items used by plugins
|
|
46
65
|
* Fixed bugs
|
|
47
66
|
|
|
@@ -54,7 +73,7 @@ Major changes:
|
|
|
54
73
|
* New logging plugin lets you have more control over logging and log files
|
|
55
74
|
* Now each website can have a plugin directory
|
|
56
75
|
* New parameters for: <a href="{relocatable: documentation/plugins/tags/wikilink.page}">wikilink</a>
|
|
57
|
-
* Changed format of backing files -> have a look at the <a href="{relocatable: documentation/plugins/
|
|
76
|
+
* Changed format of backing files -> have a look at the <a href="{relocatable: documentation/plugins/filehandlers/backing.page}">documentation</a>!
|
|
58
77
|
* Removed obsolete Extension Loader plugin
|
|
59
78
|
* Fixed bugs
|
|
60
79
|
|
|
@@ -68,9 +87,9 @@ Bug fix release for bug #1637 and other bugs
|
|
|
68
87
|
|
|
69
88
|
Major changes:
|
|
70
89
|
|
|
71
|
-
* Better DefaultLayouter for
|
|
72
|
-
* Output names for page files now customizable (see <a href="{relocatable: documentation/plugins/
|
|
73
|
-
* On-the-fly creation of thumbnails for
|
|
90
|
+
* Better DefaultLayouter for image galleries (<a href="{relocatable: Screenshots_1.page}">online demo</a>)
|
|
91
|
+
* Output names for page files now customizable (see <a href="{relocatable: documentation/plugins/filehandlers/page.page}">PageFileHandler</a>)
|
|
92
|
+
* On-the-fly creation of thumbnails for images with RMagick
|
|
74
93
|
* New tags: <a href="{relocatable: documentation/plugins/tags/sitemap.page}">sitemap</a>
|
|
75
94
|
* Tag @lang@ renamed, new name @langbar@!
|
|
76
95
|
* New parameters for @menu@ tag
|
data/doc/src/meta.info
CHANGED
|
@@ -2,7 +2,7 @@ index.page:
|
|
|
2
2
|
orderInfo: 1
|
|
3
3
|
|
|
4
4
|
download.page:
|
|
5
|
-
orderInfo:
|
|
5
|
+
orderInfo: 8
|
|
6
6
|
|
|
7
7
|
features.page:
|
|
8
8
|
orderInfo: 5
|
|
@@ -11,20 +11,20 @@ api.html:
|
|
|
11
11
|
dest: rdoc/index.html
|
|
12
12
|
title: API Reference
|
|
13
13
|
|
|
14
|
-
documentation/api.html:
|
|
15
|
-
dest:
|
|
14
|
+
documentation/references/api.html:
|
|
15
|
+
dest: ../../rdoc/index.html
|
|
16
16
|
title: API Reference
|
|
17
17
|
inMenu: true
|
|
18
18
|
orderInfo: 60
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
wiki.html:
|
|
21
21
|
dest: http://webgen.rubyforge.org/wiki/wiki.pl
|
|
22
|
-
title:
|
|
22
|
+
title: WikiWiki Web
|
|
23
23
|
inMenu: true
|
|
24
|
-
orderInfo:
|
|
24
|
+
orderInfo: 10
|
|
25
25
|
|
|
26
26
|
documentation/index.page:
|
|
27
27
|
orderInfo: 9
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
images:
|
|
30
30
|
indexFile: ~
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
mainPage:
|
|
3
|
+
orderInfo: 20
|
|
4
|
+
imagesPerPage: 20
|
|
5
|
+
files: images/screenshots/*
|
|
6
|
+
thumbnailSize: ''
|
|
7
|
+
mainPageTemplate: ''
|
|
8
|
+
title: Screenshots
|
|
9
|
+
galleryOrderInfo: 50
|
|
10
|
+
images/screenshots/wge-image.png:
|
|
11
|
+
title: Gallery editor with image preview
|
|
12
|
+
description: "When an image is selected in the image list, the pane right of it displays the
|
|
13
|
+
image."
|
|
14
|
+
orderInfo: 3
|
|
15
|
+
galleryPageInMenu: false
|
|
16
|
+
mainPageInMenu: true
|
|
17
|
+
galleryPageTemplate: ''
|
|
18
|
+
images/screenshots/wge-layout-preview.png:
|
|
19
|
+
title: Gallery editor with layout preview
|
|
20
|
+
description: This shows the gallery editor with the layout preview open. You can see how a sample gallery looks with a specific layout.
|
|
21
|
+
orderInfo: 4
|
|
22
|
+
galleryPages: {}
|
|
23
|
+
imagePageTemplate: ''
|
|
24
|
+
images/screenshots/wge-main-disabled.png:
|
|
25
|
+
title: Gallery editor main window disabled
|
|
26
|
+
description: This screenshot show how the gallery editor appears when started.
|
|
27
|
+
orderInfo: 1
|
|
28
|
+
images/screenshots/wge-main.png:
|
|
29
|
+
title: Gallery editor main window active
|
|
30
|
+
description: This screenshot shows the normal appearance of the gallery editor.
|
|
31
|
+
orderInfo: 2
|
|
32
|
+
imagePageInMenu: false
|
|
33
|
+
layout: default
|
data/install.rb
CHANGED
data/lib/webgen.rb
ADDED
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
#
|
|
2
|
+
#--
|
|
3
|
+
#
|
|
4
|
+
# $Id: webgen.rb 360 2005-11-02 08:24:26Z 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/plugin'
|
|
27
|
+
require 'webgen/gui/common'
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
module Webgen
|
|
31
|
+
|
|
32
|
+
class Color
|
|
33
|
+
|
|
34
|
+
@@colors = {:bold => [0, 1], :green => [0, 32], :lblue => [1, 34], :lred => [1, 31], :reset => [0, 0]}
|
|
35
|
+
|
|
36
|
+
def self.colorify
|
|
37
|
+
@@colors.each do |color, values|
|
|
38
|
+
module_eval <<-EOF
|
|
39
|
+
def Color.#{color.to_s}
|
|
40
|
+
"\e[#{values[0]};#{values[1]}m"
|
|
41
|
+
end
|
|
42
|
+
EOF
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def self.method_missing( id )
|
|
47
|
+
''
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
class CreateCommand < CmdParse::Command
|
|
53
|
+
|
|
54
|
+
def initialize
|
|
55
|
+
super( 'create', false )
|
|
56
|
+
self.short_desc = "Creates the basic directories and files for webgen"
|
|
57
|
+
self.description = "You can optionally specify a template and/or a style which should be used. " \
|
|
58
|
+
"This allows you to create a good starting template for your website."
|
|
59
|
+
self.options = CmdParse::OptionParserWrapper.new do |opts|
|
|
60
|
+
opts.separator "Options:"
|
|
61
|
+
opts.on( '-t', '--template TEMPLATE', 'Specify the template which should be used' ) {|@template|}
|
|
62
|
+
opts.on( '-s', '--style STYLE', 'Specify the style which should be used' ) {|@style|}
|
|
63
|
+
opts.separator ""
|
|
64
|
+
opts.separator "Available templates and styles:"
|
|
65
|
+
opts.separator opts.summary_indent + "Templates: " + Webgen::Website.templates.join(', ')
|
|
66
|
+
opts.separator opts.summary_indent + "Styles: " + Webgen::Website.styles.join(', ')
|
|
67
|
+
end
|
|
68
|
+
@template = 'default'
|
|
69
|
+
@style = 'default'
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def usage
|
|
73
|
+
"Usage: #{commandparser.program_name} [global options] create DIR"
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
def execute( args )
|
|
77
|
+
if args.length == 0
|
|
78
|
+
raise OptionParser::MissingArgument.new( 'DIR' )
|
|
79
|
+
else
|
|
80
|
+
Webgen.create_website( args[0], @template, @style )
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
class CleanCommand < CmdParse::Command
|
|
87
|
+
|
|
88
|
+
module ::FileUtils
|
|
89
|
+
|
|
90
|
+
def fu_output_message( msg )
|
|
91
|
+
logger.info { msg }
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
def ask_before_delete( ask, func, list, options = {} )
|
|
95
|
+
newlist = [*list].collect {|e| "'" + e + "'"}.join(', ')
|
|
96
|
+
if ask
|
|
97
|
+
print "Really delete #{newlist}? "
|
|
98
|
+
return unless /y|Y/ =~ gets.strip
|
|
99
|
+
end
|
|
100
|
+
self.send( func, list, options.merge( :verbose => true ) )
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
class CleanWalker < Webgen::Plugin
|
|
106
|
+
|
|
107
|
+
summary "Deletes the output file for each node."
|
|
108
|
+
depends_on 'TreeWalker'
|
|
109
|
+
|
|
110
|
+
attr_writer :ask
|
|
111
|
+
|
|
112
|
+
def handle_node( node, level )
|
|
113
|
+
file = node.recursive_value( 'dest' )
|
|
114
|
+
return if !File.exists?( file ) || node['int:virtualNode']
|
|
115
|
+
if File.directory?( file )
|
|
116
|
+
begin
|
|
117
|
+
FileUtils.ask_before_delete( @ask, :rmdir, file )
|
|
118
|
+
rescue Errno::ENOTEMPTY => e
|
|
119
|
+
logger.info "Cannot delete directory #{file}, as it is not empty!"
|
|
120
|
+
end
|
|
121
|
+
else
|
|
122
|
+
FileUtils.ask_before_delete( @ask, :rm, file, :force => true )
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
def initialize;
|
|
129
|
+
super( 'clean', false )
|
|
130
|
+
self.short_desc = "Removes the generated or all files from the output directory"
|
|
131
|
+
self.options = CmdParse::OptionParserWrapper.new do |opts|
|
|
132
|
+
opts.separator( "Options" )
|
|
133
|
+
opts.on( '--all', '-a', "Removes ALL files from the output directory" ) { @all = true }
|
|
134
|
+
opts.on( '--interactive', '-i', "Ask for each file" ) { @ask = true }
|
|
135
|
+
end
|
|
136
|
+
@all = false
|
|
137
|
+
@ask = false
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
def execute( args )
|
|
141
|
+
if @all
|
|
142
|
+
logger.info( "Deleting all files from output directory..." )
|
|
143
|
+
outDir = Plugin['Configuration']['outDirectory']
|
|
144
|
+
FileUtils.ask_before_delete( @ask, :rm_rf, outDir ) if File.exists?( outDir )
|
|
145
|
+
else
|
|
146
|
+
tree = Plugin['FileHandler'].build_tree
|
|
147
|
+
logger.info( "Deleting generated files from output directory..." )
|
|
148
|
+
Plugin['CleanWalker'].ask = @ask
|
|
149
|
+
Plugin['TreeWalker'].execute( tree, Plugin['CleanWalker'], :backward )
|
|
150
|
+
end
|
|
151
|
+
logger.info( "Webgen finished 'clean' command" )
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
class WebgenCommandParser < CmdParse::CommandParser
|
|
157
|
+
|
|
158
|
+
def initialize
|
|
159
|
+
super( true )
|
|
160
|
+
self.program_name = "webgen"
|
|
161
|
+
self.program_version = Webgen::VERSION
|
|
162
|
+
self.options = CmdParse::OptionParserWrapper.new do |opts|
|
|
163
|
+
opts.separator "Global options:"
|
|
164
|
+
opts.on( "--verbosity LEVEL", "-V", Integer, "The verbosity level" ) { |verbosity| Plugin.set_param( 'Logging', 'verbosityLevel', verbosity ) }
|
|
165
|
+
opts.on( "--[no-]logfile", "-L", "Log to file" ) { |logfile| Plugin.set_param( 'Logging', 'logToFile', logfile ) }
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Run command
|
|
169
|
+
run = CmdParse::Command.new( 'run', false )
|
|
170
|
+
run.short_desc = "Runs webgen"
|
|
171
|
+
run.set_execution_block {|args| Webgen.run_webgen }
|
|
172
|
+
self.add_command( run, true )
|
|
173
|
+
|
|
174
|
+
# Show command
|
|
175
|
+
show = CmdParse::Command.new( 'show', true )
|
|
176
|
+
show.short_desc = "Show various information"
|
|
177
|
+
self.add_command( show )
|
|
178
|
+
|
|
179
|
+
# Show plugins command
|
|
180
|
+
showPlugins = CmdParse::Command.new( 'plugins', false )
|
|
181
|
+
showPlugins.short_desc = "Show the available plugins"
|
|
182
|
+
showPlugins.set_execution_block do |args|
|
|
183
|
+
print "List of loaded plugins:\n"
|
|
184
|
+
|
|
185
|
+
headers = Hash.new {|h,k| h[k] = (k.nil? ? "Other Plugins" : k.gsub(/([A-Z][a-z])/, ' \1').strip) }
|
|
186
|
+
|
|
187
|
+
ljustlength = 30 + Color.green.length + Color.reset.length
|
|
188
|
+
header = ''
|
|
189
|
+
Plugin.config.sort { |a, b| a[0].name <=> b[0].name }.each do |klass, data|
|
|
190
|
+
newHeader = headers[klass.name[/^.*?(?=::)/]]
|
|
191
|
+
unless newHeader == header
|
|
192
|
+
print "\n #{Color.bold}#{newHeader}#{Color.reset}:\n";
|
|
193
|
+
header = newHeader
|
|
194
|
+
end
|
|
195
|
+
print " - #{Color.green}#{data.plugin}#{Color.reset}:".ljust(ljustlength) +"#{data.summary}\n"
|
|
196
|
+
end
|
|
197
|
+
end
|
|
198
|
+
show.add_command( showPlugins )
|
|
199
|
+
|
|
200
|
+
# Show params command
|
|
201
|
+
showConfig = CmdParse::Command.new( 'config', false )
|
|
202
|
+
showConfig.short_desc = "Show the parameters of all plugins or of the specified one"
|
|
203
|
+
showConfig.set_execution_block do |args|
|
|
204
|
+
puts "List of plugin parameters:"
|
|
205
|
+
puts
|
|
206
|
+
ljustlength = 25 + Color.green.length + Color.reset.length
|
|
207
|
+
Plugin.config.sort { |a, b| a[0].name[/\w*$/] <=> b[0].name[/\w*$/] }.each do |klass, data|
|
|
208
|
+
next if args.length > 0 && args[0] != data.plugin
|
|
209
|
+
puts " #{Color.bold}#{data.plugin}#{Color.reset}:"
|
|
210
|
+
puts " #{Color.green}Summary:#{Color.reset}".ljust(ljustlength) + data.summary if data.summary
|
|
211
|
+
puts " #{Color.green}Description:#{Color.reset}".ljust(ljustlength) + data.description if data.description
|
|
212
|
+
puts " #{Color.green}Tag name:#{Color.reset}".ljust(ljustlength) + (data.tag == :default ? "Default tag" : data.tag) if data.tag
|
|
213
|
+
puts " #{Color.green}Handled paths:#{Color.reset}".ljust(ljustlength) + data.path.inspect if data.path
|
|
214
|
+
|
|
215
|
+
data.table.keys.find_all {|k| /^registered_/ =~ k.to_s }.each do |k|
|
|
216
|
+
name = k.to_s.sub( /^registered_/, '' ).tr('_', ' ').capitalize + " name"
|
|
217
|
+
puts " #{Color.green}#{name}:#{Color.reset}".ljust(ljustlength) + data.send( k )
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
if data.params
|
|
221
|
+
puts "\n #{Color.green}Parameters:#{Color.reset}"
|
|
222
|
+
data.params.sort.each do |key, item|
|
|
223
|
+
print " #{Color.green}Parameter:#{Color.reset}".ljust(ljustlength)
|
|
224
|
+
puts Color.lred + item.name + Color.reset + " = " + Color.lblue + item.value.inspect + Color.reset + " (" + item.default.inspect + ")"
|
|
225
|
+
puts " #{Color.green}Description:#{Color.reset}".ljust(ljustlength) + item.description
|
|
226
|
+
puts
|
|
227
|
+
end
|
|
228
|
+
end
|
|
229
|
+
puts
|
|
230
|
+
end
|
|
231
|
+
end
|
|
232
|
+
show.add_command( showConfig )
|
|
233
|
+
|
|
234
|
+
self.add_command( CreateCommand.new )
|
|
235
|
+
self.add_command( CleanCommand.new )
|
|
236
|
+
self.add_command( CmdParse::HelpCommand.new )
|
|
237
|
+
self.add_command( CmdParse::VersionCommand.new )
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
# Run webgen
|
|
243
|
+
def self.run_webgen( directory = Dir.pwd )
|
|
244
|
+
Dir.chdir( directory )
|
|
245
|
+
|
|
246
|
+
logger.info "Starting Webgen..."
|
|
247
|
+
tree = Plugin['FileHandler'].build_tree
|
|
248
|
+
Plugin['TreeWalker'].execute( tree ) unless tree.nil?
|
|
249
|
+
Plugin['FileHandler'].write_tree( tree ) unless tree.nil?
|
|
250
|
+
logger.info "Webgen finished"
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
# Create a website in the +directory+, using the +template+ and the +style+.
|
|
254
|
+
def self.create_website( directory, template = 'default', style = 'default' )
|
|
255
|
+
templateDir = File.join( CorePlugins::Configuration.data_dir, 'website_templates', template )
|
|
256
|
+
styleDir = File.join( CorePlugins::Configuration.data_dir, 'website_styles', style )
|
|
257
|
+
raise ArgumentError.new( "Invalid template <#{template}>" ) if !File.directory?( templateDir )
|
|
258
|
+
raise ArgumentError.new( "Invalid style <#{style}>" ) if !File.directory?( styleDir )
|
|
259
|
+
|
|
260
|
+
raise ArgumentError.new( "Website directory <#{directory}> does already exist!") if File.exists?( directory )
|
|
261
|
+
FileUtils.mkdir( directory )
|
|
262
|
+
FileUtils.cp_r( Dir[File.join( templateDir, '*' )], directory )
|
|
263
|
+
FileUtils.cp_r( Dir[File.join( styleDir, '*' )], File.join( directory, 'src' ) )
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
# Main program for the webgen CLI command.
|
|
267
|
+
def self.cli_main
|
|
268
|
+
Color.colorify if $stdout.isatty && !Config::CONFIG['arch'].include?( 'mswin32' )
|
|
269
|
+
Plugin['Configuration'].cmdparser = WebgenCommandParser.new
|
|
270
|
+
Plugin['Configuration'].cmdparser.parse do |level, cmdName|
|
|
271
|
+
Plugin['Configuration'].init_all if level == 0
|
|
272
|
+
end
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
end
|