import common def html(entries, date): list_of_entries = ( "
    " + "".join( ("
  1. " + common.link_to_entry(entry) + "
  2. ") for entry in entries if entries[entry]["date"].year == date.year ) + "
" ) list_of_dates = ( "

Years:

" + "
    " + "".join( ( "
  1. " + ( f"{year:%Y}" if year.year == date.year else f'{year:%Y}' ) + "
  2. " ) for year in common.years ) + "
" + "

Months:

" + "
    " + "".join( ( "
  1. " + f'{month:%B}' + "
  2. " ) for month in common.months if month.year == date.year ) + "
" ) return common.print_html( f""" {common.head} {common.title(f"{date:%Y}")}

{date:%Y}


{common.footer} """ )