Next / Previous / Contents / Shipman's homepage

22.10. YearRow.writeMonthPages(): Generate monthly pages

This method looks in the year directory for each XML file that contains a month's worth of notes. It translates the valid ones to HTML and updates the list of months.

noteweb
# - - -   Y e a r R o w . w r i t e M o n t h P a g e s

    def writeMonthPages ( self ):
        '''Generate all monthly pages for this year.

          [ monthly web pages  :=  rendering of valid monthly XML
                files under directory self.year, if any ]
        '''

The self.__monthMap dictionary contains month keys of the form 'mm', with each value a MonthCell instance that knows how to translate its monthly page. See Section 23.3, “MonthCell.writePage(): Render as XHTML”.

noteweb
        #-- 1 --
        for mm in self.__monthMap:
            monthCell  =  self.__monthMap[mm]
            monthCell.writePage()