X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=XHTMLWriter.py;h=caa01f3ae5067739aa61e7397477e88b3beaadf3;hb=78c968010311958e053c47617e915c37f68a7690;hp=b9cfcba0273200f1428e4f9242d698276d7e8e40;hpb=c0da12e3d57fa8ec00cf4e403c463e2ea7c028a8;p=planet-ucc.git diff --git a/XHTMLWriter.py b/XHTMLWriter.py index b9cfcba..caa01f3 100644 --- a/XHTMLWriter.py +++ b/XHTMLWriter.py @@ -27,6 +27,8 @@ class XHTMLWriter: output += '
\n' output += item.contents output += '\n
\n' + if item.commentsURL: + output += '

Comments

' % item.commentsURL output += '\n' return output @@ -40,6 +42,9 @@ class XHTMLWriter: output += 'Planet UCC\n' output += '\n' output += '\n' + output += '\n' + output += '\n' + output += '\n' output += '\n' output += '\n' output += '
\n' @@ -48,6 +53,19 @@ class XHTMLWriter: except: pass output += '
\n' + output += '
\n' + for date in self.planet: + output += '

%s

\n' % time.strftime('%A %B %d, %Y', time.localtime(date.planetDate)) + for item in date.items: + output += self.__write_item__(item) + # see how many items we've written + itemcount += 1 + if itemcount >= self.maxitems: + break + # again, check to see if we've written the maximum number of items + if itemcount >= self.maxitems: + break + output += '
\n' output += '\n' - output += '
\n' - for date in self.planet: - output += '

%s

\n' % time.strftime('%A %B %d, %Y', time.localtime(date.planetDate)) - for item in date.items: - output += self.__write_item__(item) - # see how many items we've written - itemcount += 1 - if itemcount >= self.maxitems: - break - # again, check to see if we've written the maximum number of items - if itemcount >= self.maxitems: - break - output += '
\n' output += '