gallerifrey.py
def generateImagePage(image, links):
    """Creates the HTML for a single image page."""
    # 'links' is a list of (category, next, prev) tuples
    links.sort()
    accm = ['<table border="1">']
    for (cat, next, prev) in links:
        catpage = getIndexPageName(cat, 0)
        nextpage = getImagePageName(next)
        prevpage = getImagePageName(prev)
        accm.append(generateNextPrevRow(catpage, cat, nextpage, next, prevpage, prev))
    accm.append("</table>")
    linktext = '\n'.join(accm)

    text = """
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>{0}</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<h1>{0}</h1>
<p>
<a href="images/{0}">
<img src="images/{0}" height="70%%" alt="{0}">
</a>
</p>
{1}
</body>
</html>
    """.format(image, linktext)
    return text
Creates the HTML for a single image page.
Creates the HTML for a single image page.
Creates the HTML for a single image page .
def generateImagePage(image, links):
    links.sort()
    accm = ['<table border="1">']
    for (cat, next, prev) in links:
        catpage = getIndexPageName(cat, 0)
        nextpage = getImagePageName(next)
        prevpage = getImagePageName(prev)
        accm.append(generateNextPrevRow(catpage, cat, nextpage, next, prevpage, prev))
    accm.append("</table>")
    linktext = '\n'.join(accm)
    text = """
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>{0}</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<h1>{0}</h1>
<p>
<a href="images/{0}">
<img src="images/{0}" height="70%%" alt="{0}">
</a>
</p>
{1}
</body>
</html>
    """.format(image, linktext)
    return text
def generateImagePage ( image , links ) : links . sort ( ) accm = [ '<table border="1">' ] for ( cat , next , prev ) in links : catpage = getIndexPageName ( cat , 0 ) nextpage = getImagePageName ( next ) prevpage = getImagePageName ( prev ) accm . append ( generateNextPrevRow ( catpage , cat , nextpage , next , prevpage , prev ) ) accm . append ( "</table>" ) linktext = '\n' . join ( accm ) text = """
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>{0}</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<h1>{0}</h1>
<p>
<a href="images/{0}">
<img src="images/{0}" height="70%%" alt="{0}">
</a>
</p>
{1}
</body>
</html>
    """ . format ( image , linktext ) return text
Creates the HTML for a single image page.
Creates the HTML for a single image page .
"""Creates the HTML for a single image page.""" # 'links' is a list of (category, next, prev) tuples
image
links