The python scripts have been tested under
Looks for a file body.htm
in current working directory and generates
a file trWNav.xml
in the same directory. trWNav.xml
contains meta
data about body.htm
, e.g. the relative path to the home page and
information about "related nodes". More…
trwnavs.py
traverses up the directory tree until a body.htm
file
is found, which is marked with the element
<meta name="htHom" content="y"/>
This is the home page.
Generates all trWNav.xml
files for a whole branch. It recursively
processes the current working directory and all its sub-directories
and generates a structure file trWNav.xml
from each body.htm
by
using its meta data.
Imports trwnavs.py
Generates one index.htm
file. It looks for the file trWNav.xml
and body.htm
in the current working directory plus a style sheet
trWSite.xsl
in the parent directory of the home directory and
generates a file index.htm
in the same directory.
trWSite.xsl
in the parent directory of the home directoryxsltproc
must be in the path (xstlproc.exe
on Windows)
Generates all index.htm
files for a whole branch. It recursively
processes the current working directory and all its subdirectories and
generates each index.htm
from the related body.htm
and
trWNav.xml
.
trWSite.xsl
in the parent directory of the home directoryxsltproc
must be in the path (xstlproc.exe
on Windows)trwupds.py
This file is an optional part of the trgensit
package. It helps to
generate a "site map" web page.
The script recursively processes the parent of the current working
directory and all its sub-directories and generates a file body.htm
in the current working directory. The assumption is that the site map
directory is a direct child of home.
That special generated file body.htm
contains links in a tree like
fashion to all index.htm
, i.e. to all pages of the site.
That body.htm
file shall also be included in the navigation, like
all other body.htm
files. Hence ‑ after generating that site map
body.htm
file ‑ the script need to be run twice on the whole site,
to get a consistent state.
Must have files trWNav.xml
in each directory. Hence trwnvall.py
must have been run on the complete site to generate all trWNav.xml
files.
This is a central library to be included into the other python
scripts. It defines names for all the files the package trgensit
uses.
This distribution of trgensit
contains the additional script
trwupds_de.py
. This script supports using another language ‑ in my
case German ‑ next to the default language. The approach is
index.htm
would carry the default language, in my case
English. An additional language web page file could be named
xx.htm
, where xx
is the two letter ISO language code, in my case
de
.body.htm
file, for example body_de.htm
trwupds_de.py
generates the language specific file
like de.htm
, to complement the default language index.htm
a
links into the body.htm
and body_xx.htm
files. This could work, when only part of the site
is multilingual and the number of languages is low. For complex
cases, this could be automated by using appropriate code in
trWSite.xsl
xx.htm
files
into each directory, to forward to the default language index.htm
file in case there was no explicit body_xx.htm
for that directory
for that language xx
.