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(
("
" + common.link_to_entry(entry) + "
")
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:
"
+ "
"
+ "".join(
(
"
"
+ (
f"{repeated_tag}"
if repeated_tag == tag
else (
f'{repeated_tag}'
)
)
+ "
"
)
for repeated_tag in common.repeated_tags
)
+ "