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

webgen-0.5.1

webgen-0.5

webgen-0.4.2

webgen-0.4.1

webgen-0.4.0.1

webgen-0.4

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.