* src/plugins/WebPage.py: handle page titles

* src/docgen/HtmlDoc.py: handle page titles


svn: r2236
This commit is contained in:
Don Allingham 2003-10-12 02:29:24 +00:00
parent a52c5a83b9
commit 07c2e959dd
2 changed files with 15 additions and 5 deletions

View File

@ -105,7 +105,7 @@ class HtmlDoc(BaseDoc.BaseDoc):
self.top = source.top
self.bottom = source.bottom
self.base = source.base
self.file_header = source.file_header
self.fix_title(source.file_header)
self.style_declaration = source.style_declaration
self.table_styles = source.table_styles;
self.cell_styles = source.cell_styles;
@ -240,11 +240,20 @@ class HtmlDoc(BaseDoc.BaseDoc):
self.f.write(self.style_declaration)
def build_header(self):
top = string.join(self.top, "")
match = t_header_line_re.match(top)
self.fix_title(string.join(self.top, ""))
def fix_title(self,msg=None):
if msg == None:
match = t_header_line_re.match(self.file_header)
else:
match = t_header_line_re.match(msg)
if match:
m = match.groups()
self.file_header = '%s<TITLE>%s</TITLE>%s\n' % (m[0],m[1],m[2])
if self.title:
msg = self.title
else:
msg = m[1]
self.file_header = '%s<TITLE>%s</TITLE>%s\n' % (m[0],msg,m[2])
else:
self.file_header = top
self.file_header = self.process_line(self.file_header)

View File

@ -127,6 +127,7 @@ class IndividualPage:
name = person.getPrimaryName().getRegularName()
self.doc.set_title(_("Summary of %s") % name)
self.doc.fix_title()
#--------------------------------------------------------------------
#