$def with (permalink, entry, mentions) $var title = "?" $ p = entry["published"][0] $if tx.request.uri.path.startswith("2023"): $var breadcrumbs = (p.format("MM"), p.format("MMMM"), p.format("DD"), p.format("D")) $# var body_classes = ["widescreen"] $var classes = ["h-entry"] $# $if "mastodon" in entry.get("syndication", []): $ type = discover_post_type(entry) $if type == "note": ... $#
$#
$:post_mkdn(entry["content"][0]["html"])
$#
$elif type == "article": $var title = entry["name"][0] $#

$entry["name"][0]

$ content = entry["content"][0] $if isinstance(content, dict) and "html" in content:
$:post_mkdn(content["html"])
$else:
$:post_mkdn(content)
$elif type == "weight":

$entry["summary"][0]

$ weight = entry["weight"][0]

$weight["num"] $weight["unit"]

$elif type == "audio/clip": $# $var title = entry["name"][0] $#

$entry["name"][0]

$ quotation_of = entry["quotation-of"][0]

Clipped from $quotation_of

$# XXX
$:post_mkdn(entry["content"][0])
$elif type == "bookmark": $ bookmark = entry["bookmark-of"][0] $var title: Bookmarked $bookmark

Bookmarked $bookmark

$elif type == "like": $ like = entry["like-of"][0] $var title: Liked $like

Liked $like

$elif type == "rsvp": $ in_reply_to = entry["in-reply-to"][0]

RSVP $entry["rsvp"][0] to $in_reply_to

$# $ event = entry["in-reply-to"][0] $# $var title: RSVP'd $entry["rsvp"] to $event["name"] $#

RSVP'd $entry["rsvp"] $event["name"]

$else:

$type

$if tx.user.is_owner:
$for member_url in entry.get("audience", []):

$member_url

$#
$#
$# $# $if tx.user.is_owner: $# $# $for metric, value in Readability(entry["content"][0]).metrics.items(): $# $#

$metric

$# $#
$value
$# $# $# XXX $ a = entry["author"] $# $# XXX

$a["name"]

$# $# $def aside(): $#

$#

$entry["visibility"][0]

$# $# $if tx.user.session: $# reply $# $else: $# reply $# $var aside = aside $# $# $elif type == "identification": $# $ identification = entry["identification-of"][0] $# $var title: Identified $identification["name"] $#

Identified $identification["name"]

$# $elif type == "follow": $# $ follow = entry["follow-of"][0] $# $var title: Followed $follow["name"] $#

Followed $follow["name"]

$# TODO $if tx.user.is_owner: $# TODO $# TODO