ref: aad6a455b839e261efb64881838e4bd9c4efc562
parent: 566d628e2c8e1a34fc4ab72a6c6a3be41071460b
author: penny <penny@limitedideas.org>
date: Wed Oct 29 10:02:30 EDT 2025
show display names in /cat
--- a/main.go
+++ b/main.go
@@ -323,7 +323,7 @@
if index == "" {index = lastindex
}
- line, _ := templater.render("$index $username_full $content $media_descriptions\n$detail_line")+ line, _ := templater.render("$index $display_name $username_full $content $media_descriptions\n$detail_line")fmt.Print(line)
return
case "translate":
--- a/renderer.go
+++ b/renderer.go
@@ -192,6 +192,15 @@
return sb.String()
}
+// Display name stringer
+type display_name struct {+ *StatusFormatter
+}
+
+func (usr *display_name) String() string {+ return usr.status.Account.DisplayName
+}
+
// Formatted <username> stringer
type username struct {*StatusFormatter
--- a/templater.go
+++ b/templater.go
@@ -26,6 +26,7 @@
{key: "detail_line", stringer: &detailLine{sf}}, {key: "username", stringer: &username{sf}}, {key: "username_full", stringer: &username_full{sf}},+ {key: "display_name", stringer: &display_name{sf}}, {key: "boostuser", stringer: &boostedusername{sf}}, {key: "boostcontent", stringer: &boostContent{sf}}, {key: "boosted_media_descriptions", stringer: &boostMediaDescriptions{sf}},--
⑨