Next / Previous / Contents / TCC Help System / NM Tech homepage

3.9.  addEpilogue(): Add end comments

For the XHTML generated after the end of the main table, see Section 2, “ Operation ”.

homelist.py
# - - -   a d d E p i l o g u e   - - -

def addEpilogue ( doc ):
    """Add the end comments after the main table.

      [ doc is a Document object ->
          doc  :=  doc with end comments added ]
    """

    #-- 1 --
    # [ doc  :=  doc with a new paragraph element added
    #   p1   :=  that paragraph element ]
    p1  =  xc.Element ( doc, "p" )
    xc.Text ( p1, "This page is generated daily by a script. "
                  "For documentation, see\n" )

    #-- 2 --
    # [ p1  :=  p1 with a link to this document added with its
    #           title as the link text ]
    a  =  xc.Element ( p1, "a",
             href="http://www.nmt.edu/tcc/projects/homelist/" )
    cite  =  xc.Element ( a, "citetitle" )
    tt    =  xc.Element ( cite, "tt" )
    xc.Text ( tt, "homelist.py" )
    xc.Text ( cite, ":\nA script to generate a list of user homepages" )
    xc.Text ( p1, "." )

    #-- 3 --
    # [ doc  :=  doc with a new paragraph element added, containing
    #            the date timestamp
    #   p2   :=  that paragraph ]
    p2  =  xc.Element ( doc, "p" )
    xc.Text ( p2, "Last updated " )
    xc.Text ( p2, time.strftime ( "%Y-%m-%d %H:%M", time.gmtime() ) )
    xc.Text ( p2, " UT." )