(5) project technical examples links #
printer / text mode version
mksite.sh

project
- summary
- tutorial (2) (3)
  (4) (5) (6) (7) (8) (9)
- usage (2)
technical
- reasoning
- two passes
- still tiny
- sitemaps
- variables
- accessibility
  WAI SubSects
examples
- horizontal
- vertical
- tabbed (2)
- multi section
- printer style
links
- some hints
- faq&issues
- all features #
- about me
- our sitemap
- download

 

 

 

 

(C) 2004-10-12 <guidod>
 Guido Draheim

When done... run the script

If you do have (a) content pages (b) the mksite.sh script (c) the sitefile - then simply run the script. Provide the sitefile as the only arugment to the script.

sh mksite.sh site.htm        
  • The mksite.sh script will first scan the sitefile for any href starting leftmost - and build a "filelist" from it. This filelist is the list of target html files. It will look around for the corresponding source file. In our examples the target files are called "*.html" and mksite.sh will automatically find any "*.htm" content file. (But it may as well be the other way round.)
  • Next it will scan each source file for meta information. During processing it will show you the most basic meta information items like title and last modification date. These items are assembled internally in a set of global lists that are going to be used later - each page will also get a series of "< meta...>" tags in the header block that are derived from the assembled meta information.
  • After scanning all source files it will start creating the target html files. Internally it will not do it directly: instead the script generates two "sed" scripts named "~head~" and "~body~". After generating these looooong sed scripts the transformation from source to target is done in one step - one for the header and one for the content.
      sed -f page.html~head~ site.htm >page.html
      sed -f page.html~body~ page.htm >>page.html
    
  • We will show you later that it is possible to add additional things to these sed-scripts so they will be done during processing. The two scripts for each file (*~head~ and *~body~) will actually exist in the filesystem but they get removed - create a subdirectory "DEBUG" to make them permanent if you want to look at them.