xhtml

This is a small set of routines that creates html files

Command line usage (if any):

usage: xhtml.py will run a basic test of the routines

Description:

Each routine returns a string. As one builds up an html page one normally, adds the string that is returnted to a pre-existing string. When finished one writes the accumulated string to a file

Primary routines:

Notes:

History:

110505 ksl Coding begun 161031 ksl Renamed to xhtml.py to avoid conflict with anaconda

Functions

add_list(lines)

Add a simple list

begin([title])

Start an html page

end()

Finish and html page

h1(line)

Add a header line

h2(line)

Add a header line

h3(line)

Add a header line

hline([size, width])

Draw a horizontal line with thickness given by size and horizontal width given by width in percent

image([image, alt, width, height])

Add a centered image to a page

link([text, href])

Make a link to the page

paragraph([content])

Add a paragraph to the page

preformat(lines)

Add a set of preformated lines, that is text.

table(lines)

Format a table in html.

test([filename])

Test the various html subroutines