webgen
Webgen is a tool to automatically generate a menu/tab system for web-pages. It reads the definition of the menu from a file and build the final html files by composing the header, menu, content and footer of the page which can all be specified. An example of the result can be seen at this page, which was generated by webgen.
Webgen was written in C++ and is distributed under the GPL. You also need some css-files for correctly working pages, since webgen uses some predefined styles. The corresponding files are included in the archive.
Changelog
webgen-0.5.2
- added impressum tag for each menu-entry
- added hidden flag to prevent entry in menu
- date in html-file is now modifaction-time of content-file
- added css-style with NeXT-like menu
webgen-0.5.1
- using getopt_long for parameter parsing
- added german error messages
- remove obsolete code from parser.cc
- added new style (green)
- added option -s,–silent; default is now: verbosity=1
webgen-0.5
- new layout with pure css positioning
- only updates modified files (if no force specified)
- support for german language
- verbosity levels
webgen-0.4.2
- removed bug in handling of direct links
- new set of css-files
webgen-0.4.1
- included css-files into distribution
- removed IDs, html-files are now addressed by relative position
webgen-0.4.0.1
- slight changes to names and layout of css-styles
webgen-0.4
- initial public release
Menu description
The syntax for the menu description file is as follows:
Syntax: menu { fields | menu | tab } tab: name = string; - name of tab content = string; - content of tab htmlfile = string; - htmlfile to create (or link) css = string; - new css style addcss = string; - additional css style impressum = string; - link/file for contact/impressum fields: name = string; - Name in menu content = string; - content file htmlfile = string; - html file to create (or link) title = string; - title of page headline = string; - headline in page header = string; - optinal header file footer = string; - optional footer file css = string; - use css file (overwriting father definition) addcss = string; - use css file (append to father definition) impressum = string; - link/file for contact/impressum hidden; - generate html-file but do not include in menu string: [a-zA-Z]+[0-9a-zA-Z_/]* num: [0-9]+
An example would be:
menu { name = "root"; id = "root"; title = "Ronald Kriemann"; headline = " "; css = "css/darkblue.css"; # # Home page # menu { name = "Home"; content = "index.con"; } # # Projects # menu { name = "Projects"; content = "projects.con"; # # H-matrix project # menu { name = "H-thingy"; content = "projects/hmatrix/index.con"; title = "Project H-thingy"; headline = "Project H-thingy"; menu { name = "Approximation"; content = "projects/hmatrix/approx.con"; } menu { name = "Performance"; content = "projects/hmatrix/perf.con"; tab { name = "Matrix-Vector"; content = "projects/hmatrix/mv.con"; } tab { name = "Matrix-Matrix"; content = "projects/hmatrix/mm.con"; } tab { name = "Matrix-Inversion"; content = "projects/hmatrix/mi.con"; } } menu { name = "Tips"; content = ""; tab { name = "malloc"; content = "projects/hmatrix/malloc.con"; } tab { name = "BLAS"; content = "projects/hmatrix/blas.con"; } } } } }
If not specified in a submenu, title, headline and css-files are inherited from the father-menu.
If no headline is specified, this section will be skipped in the html-file. If no content but an html-file was supplied, the menu/tab will be treated as a link and no file is generated.