Update of /cvsroot/pywin32/pywin32/AutoDuck
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28074
Modified Files:
InsertExternalOverviews.py document_object.py pyhtml.fmt
pywin32-document.xml
Log Message:
Hack in basic support for "important release notes" that are designed to
stand-out in the .chm. The first "important release note" relates to
currency support.
Index: pywin32-document.xml
===================================================================
RCS file: /cvsroot/pywin32/pywin32/AutoDuck/pywin32-document.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** pywin32-document.xml 6 Oct 2004 06:09:12 -0000 1.4
--- pywin32-document.xml 31 May 2005 12:40:05 -0000 1.5
***************
*** 1,3 ****
--- 1,6 ----
<document>
+ <important>
+ <item name="Important notes about COM currency support changes" href="html/com/win32com/readme.htm#currency"/>
+ </important>
<links>
<item name="Python Web Site" href="http://www.python.org"/>
Index: pyhtml.fmt
===================================================================
RCS file: /cvsroot/pywin32/pywin32/AutoDuck/pyhtml.fmt,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** pyhtml.fmt 11 Sep 2004 07:48:57 -0000 1.9
--- pyhtml.fmt 31 May 2005 12:40:05 -0000 1.10
***************
*** 96,99 ****
--- 96,102 ----
<H1>$(title)</H1>
<P>
+ <H2>Important Release Notes</H2>
+ <!--index:eximportant-->
+
<H2>External Resources</H2>
<!--index:exlinks-->
Index: document_object.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/AutoDuck/document_object.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** document_object.py 17 Apr 2002 14:06:19 -0000 1.1
--- document_object.py 31 May 2005 12:40:05 -0000 1.2
***************
*** 6,9 ****
--- 6,10 ----
def __init__(self):
self.document = None
+ self.in_importants = False
def startElement(self, name, attrs):
if name=="document":
***************
*** 17,26 ****
elif name=="item":
item = Item(attrs)
! if self.document.categories:
category = self.document.categories[-1]
category.overviewItems.items.append(item)
else:
self.document.links.append(item)
def endDocument(self):
pass
--- 18,34 ----
elif name=="item":
item = Item(attrs)
! if self.in_importants:
! self.document.important.append(item)
! elif self.document.categories:
category = self.document.categories[-1]
category.overviewItems.items.append(item)
else:
self.document.links.append(item)
+ elif name=="important":
+ self.in_importants = True
+ def endElement(self, name):
+ if name=="important":
+ self.in_importants = False
def endDocument(self):
pass
***************
*** 31,34 ****
--- 39,43 ----
self.categories = []
self.links = []
+ self.important = []
def __iter__(self):
return iter(self.categories)
***************
*** 59,62 ****
--- 68,75 ----
if __name__=='__main__':
doc = GetDocument()
+ print "Important Notes"
+ for link in doc.important:
+ print " ", link.name, link.href
+
print "Doc links"
for link in doc.links:
Index: InsertExternalOverviews.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/AutoDuck/InsertExternalOverviews.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** InsertExternalOverviews.py 17 Apr 2002 14:06:19 -0000 1.1
--- InsertExternalOverviews.py 31 May 2005 12:40:05 -0000 1.2
***************
*** 12,16 ****
"""
! def processFile(input, out, extLinksHTML, extTopicHTML):
while 1:
line = input.readline()
--- 12,16 ----
"""
! def processFile(input, out, extLinksHTML, extTopicHTML, importantHTML):
while 1:
line = input.readline()
***************
*** 19,22 ****
--- 19,23 ----
line = string.replace(line, "<!--index:exlinks-->", extLinksHTML)
line = string.replace(line, "<!--index:extopics-->", extTopicHTML)
+ line = string.replace(line, "<!--index:eximportant-->", importantHTML)
out.write(line + "\n")
***************
*** 34,40 ****
return s
! def genLinksHTML(doc):
s = ""
! for link in doc.links:
s = s + '<LI><A HREF="%s">%s</A>\n' % (link.href, link.name)
return s
--- 35,41 ----
return s
! def genLinksHTML(links):
s = ""
! for link in links:
s = s + '<LI><A HREF="%s">%s</A>\n' % (link.href, link.name)
return s
***************
*** 50,56 ****
out = open(file + ".2", "w")
doc = document_object.GetDocument()
! linksHTML = genLinksHTML(doc)
extTopicHTML = genHTML(doc)
! processFile(input, out, linksHTML, extTopicHTML)
input.close()
out.close()
--- 51,58 ----
out = open(file + ".2", "w")
doc = document_object.GetDocument()
! linksHTML = genLinksHTML(doc.links)
extTopicHTML = genHTML(doc)
! importantHTML = genLinksHTML(doc.important)
! processFile(input, out, linksHTML, extTopicHTML, importantHTML)
input.close()
out.close()
|