Given the data structures described in Section 2.1, “Data structures”, here is the overall program flow.
Determine the reporting interval by subtracting EXPIRE_DAYS days from the current time.
Create the single AccessSummary
instance and inform it of the reporting interval.
Read all the access logs, generating a stream of
records as PageGet instances. Select
the relevant records using various filtering criteria
(see the section “Filtering the Logs”
in the specification), and add the selected records to the AccessSummary instance.
Generate the index page and the two 26-entry indices for personal and official pages, by their initial characters.
Use the sorted values from the urlMap
dictionary to build the hit parade page, minus any
entries with fewer than MIN_HITS
accesses.
Generate the two-column table of links to personal and offical pages.
For each link in this table, also generate the pages
with links to each user (pers-a.html, pers-b.html and so on, and off-a.html, off-b.html, and so on.
While generating those pages, also generate the access report pages for each user or official directory.