[Synopsis-changes] Synopsis/Synopsis/Synopsis/Formatter/HTML Page.py,1.16,1.17
Stefan Seefeld stefan at synopsis.fresco.orgTue Oct 21 20:53:32 UTC 2003
- Previous message: [Synopsis-changes] Synopsis/Synopsis/Synopsis/Linker Comments.py,1.23,1.24
- Next message: [Synopsis-changes] Synopsis/Synopsis/Synopsis/Parser/Python Parser.py,NONE,1.1 __init__.py,1.5,1.6
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Update of /cvs/synopsis/Synopsis/Synopsis/Formatter/HTML
In directory frida:/tmp/cvs-serv15298
Modified Files:
Page.py
Log Message:
reenable logging of page instance to aid debugging
Index: Page.py
===================================================================
RCS file: /cvs/synopsis/Synopsis/Synopsis/Formatter/HTML/Page.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -p -d -r1.16 -r1.17
--- Page.py 16 Jan 2003 12:46:46 -0000 1.16
+++ Page.py 21 Oct 2003 20:53:30 -0000 1.17
@@ -20,6 +20,9 @@
# 02111-1307, USA.
#
# $Log$
+# Revision 1.17 2003/10/21 20:53:30 stefan
+# reenable logging of page instance to aid debugging
+#
# Revision 1.16 2003/01/16 12:46:46 chalky
# Renamed FilePages to FileSource, FileTree to FileListing. Added FileIndexer
# (used to be part of FileTree) and FileDetails.
@@ -111,7 +114,7 @@ class PageFormat:
as appropraite."""
return self.__prefix
- def page_header(self, os, title, body, headextra):
+ def page_header(self, os, title, body, headextra, page):
"""Called to output the page header to the given output stream.
@param os a file-like object (use os.write())
@param title the title of this page
@@ -122,6 +125,8 @@ class PageFormat:
"""
os.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">')
os.write("<html>\n<head>\n")
+ os.write('<!-- ' + page.filename() + ' -->\n')
+ os.write('<!-- this page was generated by ' + page.__class__.__name__ + ' -->\n')
os.write(entity('title','Synopsis - '+ title) + '\n')
ss = self.stylesheet()
if ss: os.write(solotag('link', type='text/css', rel='stylesheet', href=ss) + '\n')
@@ -206,7 +211,7 @@ class TemplatePageFormat (PageFormat):
sections = string.split(text, '@PREFIX@')
os.write(string.join(sections, self.prefix()))
- def page_header(self, os, title, body, headextra):
+ def page_header(self, os, title, body, headextra, page):
"""Formats the header using the template file"""
if not body: return PageFormat.page_header(self, os, title, body, headextra)
header = self.__header
@@ -320,7 +325,7 @@ class Page:
self.__os = self.open_file()
prefix = rel(self.filename(), '')
self.__format.set_prefix(prefix)
- self.__format.page_header(self.__os, self.title(), body, headextra)
+ self.__format.page_header(self.__os, self.title(), body, headextra, self)
def end_file(self, body='</body>'):
"""Close the file using given close body tag. The default is
- Previous message: [Synopsis-changes] Synopsis/Synopsis/Synopsis/Linker Comments.py,1.23,1.24
- Next message: [Synopsis-changes] Synopsis/Synopsis/Synopsis/Parser/Python Parser.py,NONE,1.1 __init__.py,1.5,1.6
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Synopsis-changes mailing list