misc/libfreetype/src/tools/docmaker/tohtml.py
author koda
Mon, 25 Apr 2011 01:46:54 +0200
changeset 5172 88f2e05288ba
permissions -rw-r--r--
aaand let's add freetype as well while we are at it other smaller changes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5172
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     1
#  ToHTML (c) 2002, 2003, 2005, 2006, 2007, 2008
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     2
#    David Turner <david@freetype.org>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     3
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     4
from sources import *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     5
from content import *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     6
from formatter import *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     7
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     8
import time
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     9
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    10
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    11
# The following defines the HTML header used by all generated pages.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    12
html_header_1 = """\
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    13
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    14
"http://www.w3.org/TR/html4/loose.dtd">
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    15
<html>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    16
<head>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    17
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    18
<title>\
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    19
"""
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    20
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    21
html_header_2 = """\
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    22
 API Reference</title>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    23
<style type="text/css">
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    24
  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    25
         color: #000000;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    26
         background: #FFFFFF; }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    27
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    28
  p { text-align: justify; }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    29
  h1 { text-align: center; }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    30
  li { text-align: justify; }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    31
  td { padding: 0 0.5em 0 0.5em; }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    32
  td.left { padding: 0 0.5em 0 0.5em;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    33
            text-align: left; }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    34
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    35
  a:link { color: #0000EF; }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    36
  a:visited { color: #51188E; }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    37
  a:hover { color: #FF0000; }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    38
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    39
  span.keyword { font-family: monospace;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    40
                 text-align: left;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    41
                 white-space: pre;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    42
                 color: darkblue; }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    43
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    44
  pre.colored { color: blue; }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    45
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    46
  ul.empty { list-style-type: none; }
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    47
</style>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    48
</head>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    49
<body>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    50
"""
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    51
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    52
html_header_3 = """
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    53
<table align=center><tr><td><font size=-1>[<a href="\
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    54
"""
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    55
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    56
html_header_3i = """
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    57
<table align=center><tr><td width="100%"></td>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    58
<td><font size=-1>[<a href="\
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    59
"""
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    60
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    61
html_header_4 = """\
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    62
">Index</a>]</font></td>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    63
<td width="100%"></td>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    64
<td><font size=-1>[<a href="\
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    65
"""
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    66
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    67
html_header_5 = """\
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    68
">TOC</a>]</font></td></tr></table>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    69
<center><h1>\
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    70
"""
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    71
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    72
html_header_5t = """\
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    73
">Index</a>]</font></td>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    74
<td width="100%"></td></tr></table>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    75
<center><h1>\
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    76
"""
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    77
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    78
html_header_6 = """\
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    79
 API Reference</h1></center>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    80
"""
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    81
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    82
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    83
# The HTML footer used by all generated pages.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    84
html_footer = """\
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    85
</body>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    86
</html>\
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    87
"""
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    88
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    89
# The header and footer used for each section.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    90
section_title_header = "<center><h1>"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    91
section_title_footer = "</h1></center>"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    92
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    93
# The header and footer used for code segments.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    94
code_header = '<pre class="colored">'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    95
code_footer = '</pre>'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    96
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    97
# Paragraph header and footer.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    98
para_header = "<p>"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    99
para_footer = "</p>"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   100
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   101
# Block header and footer.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   102
block_header        = '<table align=center width="75%"><tr><td>'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   103
block_footer_start  = """\
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   104
</td></tr></table>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   105
<hr width="75%">
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   106
<table align=center width="75%"><tr><td><font size=-2>[<a href="\
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   107
"""
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   108
block_footer_middle = """\
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   109
">Index</a>]</font></td>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   110
<td width="100%"></td>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   111
<td><font size=-2>[<a href="\
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   112
"""
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   113
block_footer_end    = """\
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   114
">TOC</a>]</font></td></tr></table>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   115
"""
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   116
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   117
# Description header/footer.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   118
description_header = '<table align=center width="87%"><tr><td>'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   119
description_footer = "</td></tr></table><br>"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   120
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   121
# Marker header/inter/footer combination.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   122
marker_header = '<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   123
marker_inter  = "</b></em></td></tr><tr><td>"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   124
marker_footer = "</td></tr></table>"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   125
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   126
# Header location header/footer.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   127
header_location_header = '<table align=center width="87%"><tr><td>'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   128
header_location_footer = "</td></tr></table><br>"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   129
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   130
# Source code extracts header/footer.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   131
source_header = '<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>\n'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   132
source_footer = "\n</pre></table><br>"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   133
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   134
# Chapter header/inter/footer.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   135
chapter_header = '<br><table align=center width="75%"><tr><td><h2>'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   136
chapter_inter  = '</h2><ul class="empty"><li>'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   137
chapter_footer = '</li></ul></td></tr></table>'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   138
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   139
# Index footer.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   140
index_footer_start = """\
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   141
<hr>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   142
<table><tr><td width="100%"></td>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   143
<td><font size=-2>[<a href="\
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   144
"""
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   145
index_footer_end = """\
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   146
">TOC</a>]</font></td></tr></table>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   147
"""
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   148
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   149
# TOC footer.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   150
toc_footer_start = """\
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   151
<hr>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   152
<table><tr><td><font size=-2>[<a href="\
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   153
"""
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   154
toc_footer_end = """\
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   155
">Index</a>]</font></td>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   156
<td width="100%"></td>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   157
</tr></table>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   158
"""
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   159
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   160
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   161
# source language keyword coloration/styling
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   162
keyword_prefix = '<span class="keyword">'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   163
keyword_suffix = '</span>'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   164
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   165
section_synopsis_header = '<h2>Synopsis</h2>'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   166
section_synopsis_footer = ''
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   167
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   168
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   169
# Translate a single line of source to HTML.  This will convert
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   170
# a "<" into "&lt.", ">" into "&gt.", etc.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   171
def  html_quote( line ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   172
    result = string.replace( line, "&", "&amp;" )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   173
    result = string.replace( result, "<", "&lt;" )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   174
    result = string.replace( result, ">", "&gt;" )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   175
    return result
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   176
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   177
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   178
# same as 'html_quote', but ignores left and right brackets
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   179
def  html_quote0( line ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   180
    return string.replace( line, "&", "&amp;" )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   181
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   182
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   183
def  dump_html_code( lines, prefix = "" ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   184
    # clean the last empty lines
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   185
    l = len( self.lines )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   186
    while l > 0 and string.strip( self.lines[l - 1] ) == "":
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   187
        l = l - 1
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   188
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   189
    # The code footer should be directly appended to the last code
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   190
    # line to avoid an additional blank line.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   191
    print prefix + code_header,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   192
    for line in self.lines[0 : l + 1]:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   193
        print '\n' + prefix + html_quote( line ),
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   194
    print prefix + code_footer,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   195
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   196
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   197
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   198
class  HtmlFormatter( Formatter ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   199
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   200
    def  __init__( self, processor, project_title, file_prefix ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   201
        Formatter.__init__( self, processor )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   202
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   203
        global html_header_1, html_header_2, html_header_3
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   204
        global html_header_4, html_header_5, html_footer
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   205
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   206
        if file_prefix:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   207
            file_prefix = file_prefix + "-"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   208
        else:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   209
            file_prefix = ""
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   210
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   211
        self.headers           = processor.headers
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   212
        self.project_title     = project_title
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   213
        self.file_prefix       = file_prefix
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   214
        self.html_header       = html_header_1 + project_title +              \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   215
                                 html_header_2 +                              \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   216
                                 html_header_3 + file_prefix + "index.html" + \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   217
                                 html_header_4 + file_prefix + "toc.html" +   \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   218
                                 html_header_5 + project_title +              \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   219
                                 html_header_6
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   220
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   221
        self.html_index_header = html_header_1 + project_title +             \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   222
                                 html_header_2 +                             \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   223
                                 html_header_3i + file_prefix + "toc.html" + \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   224
                                 html_header_5 + project_title +             \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   225
                                 html_header_6
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   226
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   227
        self.html_toc_header   = html_header_1 + project_title +              \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   228
                                 html_header_2 +                              \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   229
                                 html_header_3 + file_prefix + "index.html" + \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   230
                                 html_header_5t + project_title +             \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   231
                                 html_header_6
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   232
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   233
        self.html_footer       = "<center><font size=""-2"">generated on " +     \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   234
                                 time.asctime( time.localtime( time.time() ) ) + \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   235
                                 "</font></center>" + html_footer
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   236
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   237
        self.columns = 3
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   238
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   239
    def  make_section_url( self, section ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   240
        return self.file_prefix + section.name + ".html"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   241
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   242
    def  make_block_url( self, block ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   243
        return self.make_section_url( block.section ) + "#" + block.name
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   244
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   245
    def  make_html_words( self, words ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   246
        """ convert a series of simple words into some HTML text """
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   247
        line = ""
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   248
        if words:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   249
            line = html_quote( words[0] )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   250
            for w in words[1:]:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   251
                line = line + " " + html_quote( w )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   252
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   253
        return line
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   254
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   255
    def  make_html_word( self, word ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   256
        """analyze a simple word to detect cross-references and styling"""
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   257
        # look for cross-references
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   258
        m = re_crossref.match( word )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   259
        if m:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   260
            try:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   261
                name = m.group( 1 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   262
                rest = m.group( 2 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   263
                block = self.identifiers[name]
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   264
                url   = self.make_block_url( block )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   265
                return '<a href="' + url + '">' + name + '</a>' + rest
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   266
            except:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   267
                # we detected a cross-reference to an unknown item
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   268
                sys.stderr.write( \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   269
                   "WARNING: undefined cross reference '" + name + "'.\n" )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   270
                return '?' + name + '?' + rest
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   271
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   272
        # look for italics and bolds
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   273
        m = re_italic.match( word )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   274
        if m:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   275
            name = m.group( 1 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   276
            rest = m.group( 3 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   277
            return '<i>' + name + '</i>' + rest
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   278
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   279
        m = re_bold.match( word )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   280
        if m:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   281
            name = m.group( 1 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   282
            rest = m.group( 3 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   283
            return '<b>' + name + '</b>' + rest
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   284
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   285
        return html_quote( word )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   286
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   287
    def  make_html_para( self, words ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   288
        """ convert words of a paragraph into tagged HTML text, handle xrefs """
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   289
        line = ""
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   290
        if words:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   291
            line = self.make_html_word( words[0] )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   292
            for word in words[1:]:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   293
                line = line + " " + self.make_html_word( word )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   294
            # convert `...' quotations into real left and right single quotes
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   295
            line = re.sub( r"(^|\W)`(.*?)'(\W|$)",  \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   296
                           r'\1&lsquo;\2&rsquo;\3', \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   297
                           line )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   298
            # convert tilde into non-breakable space
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   299
            line = string.replace( line, "~", "&nbsp;" )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   300
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   301
        return para_header + line + para_footer
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   302
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   303
    def  make_html_code( self, lines ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   304
        """ convert a code sequence to HTML """
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   305
        line = code_header + '\n'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   306
        for l in lines:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   307
            line = line + html_quote( l ) + '\n'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   308
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   309
        return line + code_footer
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   310
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   311
    def  make_html_items( self, items ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   312
        """ convert a field's content into some valid HTML """
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   313
        lines = []
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   314
        for item in items:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   315
            if item.lines:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   316
                lines.append( self.make_html_code( item.lines ) )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   317
            else:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   318
                lines.append( self.make_html_para( item.words ) )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   319
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   320
        return string.join( lines, '\n' )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   321
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   322
    def  print_html_items( self, items ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   323
        print self.make_html_items( items )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   324
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   325
    def  print_html_field( self, field ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   326
        if field.name:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   327
            print "<table><tr valign=top><td><b>" + field.name + "</b></td><td>"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   328
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   329
        print self.make_html_items( field.items )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   330
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   331
        if field.name:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   332
            print "</td></tr></table>"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   333
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   334
    def  html_source_quote( self, line, block_name = None ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   335
        result = ""
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   336
        while line:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   337
            m = re_source_crossref.match( line )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   338
            if m:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   339
                name   = m.group( 2 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   340
                prefix = html_quote( m.group( 1 ) )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   341
                length = len( m.group( 0 ) )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   342
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   343
                if name == block_name:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   344
                    # this is the current block name, if any
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   345
                    result = result + prefix + '<b>' + name + '</b>'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   346
                elif re_source_keywords.match( name ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   347
                    # this is a C keyword
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   348
                    result = result + prefix + keyword_prefix + name + keyword_suffix
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   349
                elif self.identifiers.has_key( name ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   350
                    # this is a known identifier
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   351
                    block = self.identifiers[name]
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   352
                    result = result + prefix + '<a href="' + \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   353
                             self.make_block_url( block ) + '">' + name + '</a>'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   354
                else:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   355
                    result = result + html_quote( line[:length] )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   356
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   357
                line = line[length:]
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   358
            else:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   359
                result = result + html_quote( line )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   360
                line   = []
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   361
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   362
        return result
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   363
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   364
    def  print_html_field_list( self, fields ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   365
        print "<p></p>"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   366
        print "<table cellpadding=3 border=0>"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   367
        for field in fields:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   368
            if len( field.name ) > 22:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   369
              print "<tr valign=top><td colspan=0><b>" + field.name + "</b></td></tr>"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   370
              print "<tr valign=top><td></td><td>"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   371
            else:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   372
              print "<tr valign=top><td><b>" + field.name + "</b></td><td>"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   373
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   374
            self.print_html_items( field.items )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   375
            print "</td></tr>"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   376
        print "</table>"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   377
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   378
    def  print_html_markup( self, markup ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   379
        table_fields = []
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   380
        for field in markup.fields:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   381
            if field.name:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   382
                # we begin a new series of field or value definitions, we
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   383
                # will record them in the 'table_fields' list before outputting
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   384
                # all of them as a single table
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   385
                #
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   386
                table_fields.append( field )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   387
            else:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   388
                if table_fields:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   389
                    self.print_html_field_list( table_fields )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   390
                    table_fields = []
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   391
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   392
                self.print_html_items( field.items )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   393
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   394
        if table_fields:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   395
            self.print_html_field_list( table_fields )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   396
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   397
    #
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   398
    #  Formatting the index
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   399
    #
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   400
    def  index_enter( self ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   401
        print self.html_index_header
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   402
        self.index_items = {}
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   403
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   404
    def  index_name_enter( self, name ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   405
        block = self.identifiers[name]
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   406
        url   = self.make_block_url( block )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   407
        self.index_items[name] = url
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   408
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   409
    def  index_exit( self ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   410
        # block_index already contains the sorted list of index names
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   411
        count = len( self.block_index )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   412
        rows  = ( count + self.columns - 1 ) / self.columns
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   413
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   414
        print "<table align=center border=0 cellpadding=0 cellspacing=0>"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   415
        for r in range( rows ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   416
            line = "<tr>"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   417
            for c in range( self.columns ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   418
                i = r + c * rows
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   419
                if i < count:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   420
                    bname = self.block_index[r + c * rows]
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   421
                    url   = self.index_items[bname]
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   422
                    line = line + '<td><a href="' + url + '">' + bname + '</a></td>'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   423
                else:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   424
                    line = line + '<td></td>'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   425
            line = line + "</tr>"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   426
            print line
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   427
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   428
        print "</table>"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   429
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   430
        print index_footer_start +            \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   431
              self.file_prefix + "toc.html" + \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   432
              index_footer_end
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   433
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   434
        print self.html_footer
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   435
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   436
        self.index_items = {}
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   437
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   438
    def  index_dump( self, index_filename = None ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   439
        if index_filename == None:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   440
            index_filename = self.file_prefix + "index.html"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   441
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   442
        Formatter.index_dump( self, index_filename )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   443
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   444
    #
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   445
    #  Formatting the table of content
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   446
    #
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   447
    def  toc_enter( self ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   448
        print self.html_toc_header
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   449
        print "<center><h1>Table of Contents</h1></center>"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   450
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   451
    def  toc_chapter_enter( self, chapter ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   452
        print  chapter_header + string.join( chapter.title ) + chapter_inter
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   453
        print "<table cellpadding=5>"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   454
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   455
    def  toc_section_enter( self, section ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   456
        print '<tr valign=top><td class="left">'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   457
        print '<a href="' + self.make_section_url( section ) + '">' + \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   458
               section.title + '</a></td><td>'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   459
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   460
        print self.make_html_para( section.abstract )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   461
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   462
    def  toc_section_exit( self, section ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   463
        print "</td></tr>"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   464
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   465
    def  toc_chapter_exit( self, chapter ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   466
        print "</table>"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   467
        print chapter_footer
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   468
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   469
    def  toc_index( self, index_filename ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   470
        print chapter_header +                                      \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   471
              '<a href="' + index_filename + '">Global Index</a>' + \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   472
              chapter_inter + chapter_footer
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   473
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   474
    def  toc_exit( self ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   475
        print toc_footer_start +                \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   476
              self.file_prefix + "index.html" + \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   477
              toc_footer_end
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   478
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   479
        print self.html_footer
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   480
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   481
    def  toc_dump( self, toc_filename = None, index_filename = None ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   482
        if toc_filename == None:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   483
            toc_filename = self.file_prefix + "toc.html"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   484
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   485
        if index_filename == None:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   486
            index_filename = self.file_prefix + "index.html"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   487
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   488
        Formatter.toc_dump( self, toc_filename, index_filename )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   489
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   490
    #
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   491
    #  Formatting sections
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   492
    #
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   493
    def  section_enter( self, section ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   494
        print self.html_header
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   495
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   496
        print section_title_header
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   497
        print section.title
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   498
        print section_title_footer
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   499
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   500
        maxwidth = 0
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   501
        for b in section.blocks.values():
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   502
            if len( b.name ) > maxwidth:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   503
                maxwidth = len( b.name )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   504
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   505
        width = 70  # XXX magic number
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   506
        if maxwidth <> 0:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   507
            # print section synopsis
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   508
            print section_synopsis_header
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   509
            print "<table align=center cellspacing=5 cellpadding=0 border=0>"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   510
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   511
            columns = width / maxwidth
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   512
            if columns < 1:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   513
                columns = 1
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   514
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   515
            count = len( section.block_names )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   516
            rows  = ( count + columns - 1 ) / columns
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   517
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   518
            for r in range( rows ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   519
                line = "<tr>"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   520
                for c in range( columns ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   521
                    i = r + c * rows
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   522
                    line = line + '<td></td><td>'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   523
                    if i < count:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   524
                        name = section.block_names[i]
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   525
                        line = line + '<a href="#' + name + '">' + name + '</a>'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   526
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   527
                    line = line + '</td>'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   528
                line = line + "</tr>"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   529
                print line
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   530
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   531
            print "</table><br><br>"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   532
            print section_synopsis_footer
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   533
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   534
        print description_header
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   535
        print self.make_html_items( section.description )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   536
        print description_footer
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   537
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   538
    def  block_enter( self, block ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   539
        print block_header
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   540
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   541
        # place html anchor if needed
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   542
        if block.name:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   543
            print '<h4><a name="' + block.name + '">' + block.name + '</a></h4>'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   544
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   545
        # dump the block C source lines now
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   546
        if block.code:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   547
            header = ''
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   548
            for f in self.headers.keys():
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   549
                if block.source.filename.find( f ) >= 0:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   550
                    header = self.headers[f] + ' (' + f + ')'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   551
                    break;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   552
                
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   553
#           if not header:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   554
#               sys.stderr.write( \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   555
#                 'WARNING: No header macro for ' + block.source.filename + '.\n' )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   556
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   557
            if header:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   558
                print header_location_header
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   559
                print 'Defined in ' + header + '.'
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   560
                print header_location_footer
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   561
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   562
            print source_header
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   563
            for l in block.code:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   564
                print self.html_source_quote( l, block.name )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   565
            print source_footer
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   566
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   567
    def  markup_enter( self, markup, block ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   568
        if markup.tag == "description":
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   569
            print description_header
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   570
        else:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   571
            print marker_header + markup.tag + marker_inter
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   572
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   573
        self.print_html_markup( markup )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   574
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   575
    def  markup_exit( self, markup, block ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   576
        if markup.tag == "description":
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   577
            print description_footer
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   578
        else:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   579
            print marker_footer
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   580
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   581
    def  block_exit( self, block ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   582
        print block_footer_start + self.file_prefix + "index.html" + \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   583
              block_footer_middle + self.file_prefix + "toc.html" +  \
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   584
              block_footer_end
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   585
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   586
    def  section_exit( self, section ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   587
        print html_footer
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   588
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   589
    def  section_dump_all( self ):
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   590
        for section in self.sections:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   591
            self.section_dump( section, self.file_prefix + section.name + '.html' )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   592
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   593
# eof