New: as of June 2017, genhtml now
handles ".*" Mac/Unix cruft files in inserts and templates folders.
This includes both ".DS_Store" Finder files, and any "._*" AppleDouble
resource-fork files on non-Mac drives. Both are skipped in inserts
to avoid errors, but are simply copied like other non-HTML in templates
because more may pop up before publication—filter later with your
zip or upload tools (e.g., ziptools).
See the new script's docstring for details. For a quick example of genhtml at work, see also the template file for the page you are viewing, and its expansion via your browser's "view source." There's also a new example site-publisher master script that uses genhtml as a nested tool, and is used to publish the website you are viewing.
Among its features, this program has automatic dependency tracking—HTML files are regenerated when their templates or any inserts they use have changed; configurable Unicode support—encodings in a sequence are tried in turn for each HTML file; and one-level nested inserts—insert files can insert other insert files. It also serves to illustrate a typical utility role for Python scripts.
See the main script's docstring and other items below for usage details.
Code and docs:
This program was last changed June 11, 2017.
For more code examples, see the programs page.