$if item_type == "entry":
$ entry = item
$ post_type = discover_post_type(entry)
$if post_type == "bookmark":
$# $entry["content"]
Bookmarked $entry["bookmark-of"][0]
$elif "rsvp" in entry:
$ in_reply_to = entry["in-reply-to"][0]
$ colors = {
$ "yes": "859900",
$ "maybe": "b58900",
$ "no": "cb4b16",
$ }
RSVP $entry["rsvp"][0] to
$in_reply_to
$elif item_type == "audio/clip":
$elif "audio" in entry:
$entry
$#
$# $entry["summary"][0]
$elif "photo" in entry:
$elif "content" in entry and "name" in entry:
$:entry["name"][0]
$# $:entry["content"][0]
$elif content := entry.get("content"):
$ c = content
$if isinstance(c, dict):
$:c["html"]
$else:
$if isinstance(c[0], dict):
$:c[0]["html"]
$else:
$:c[0]
$elif "listen-of" in entry:
$ listen_of = entry["listen-of"][0]
$if isinstance(listen_of, str):
Listened to $listen_of
$else:
$ author = listen_of["author"][0]
$ youtube_id = listen_of["url"][0].partition("?")[2]
Listened to $author["name"] –
$listen_of["name"][0]
$#
$elif "like-of" in entry:
$ like_of = entry["like-of"][0]
$elif "bookmark-of" in entry:
$ bookmark_of = entry["bookmark-of"][0]
$else:
$entry
$elif item_type == "canopy-project":
$ project = item
Created project $project["name"][0]
$ published = item['published'][0]
\