import common def atom(entries, tag): return ( """""" """""" "" + common.title(tag) + "" "" + common.base_url + common.url_of_tag(tag) + "" f"""""" f"""""" "Grey Nicholson" "" + common.base_url + "/style/icon.svg" "" + common.updated.isoformat() + "" + "\n" + "\n".join( common.atom_entry(id) for id in reversed(entries) if "tags" in common.entries[id] and common.slugify(tag) in map(common.slugify, common.entries[id]["tags"]) ) + "\n" + "" ) def html(entries, tag): head = f"""""" list_of_entries = ( "
    " + "".join( ("
  1. " + common.link_to_entry(entry) + "
  2. ") for entry in reversed(entries) if "tags" in entries[entry] and common.slugify(tag) in map(common.slugify, entries[entry]["tags"]) ) + "
" ) list_of_tags = ( ( "

Tags:

" + "" ) if len(common.repeated_tags) > 0 else "" ) return common.print_html( f""" {common.head} {head} {common.title(tag)}

{tag}


{common.footer} """ )