shithub: hell

Download patch

ref: b049b94a7e8df765635e68e7e6d00053ddc93922
parent: b459d984f54e4c5c5dc215cf19a1e502ca06b4f9
author: penny <penny@limitedideas.org>
date: Mon Oct 27 15:10:13 EDT 2025

add /home to browse timeline

--- a/commands.go
+++ b/commands.go
@@ -4,7 +4,7 @@
 	"strings"
 )
 
-var commands = []string{"examine", "reply", "like", "thread", "open", "prev", "download", "dm", "rt", "parent", "children", "rm", "mark", "unmark", "account", "import", "pause", "resume", "url", "fpost", "ufpost", "edit", "notice", "stats", "next", "view", "bookmarks", "follow", "unfollow", "likes", "help", "reload", "attach", "detach", "pinned", "cat", "play", "translate", "read", "version", "local", "public", "block", "unblock", "unlike"}
+var commands = []string{"examine", "reply", "like", "thread", "open", "prev", "download", "dm", "rt", "parent", "children", "rm", "mark", "unmark", "account", "import", "pause", "resume", "url", "fpost", "ufpost", "edit", "notice", "stats", "next", "view", "bookmarks", "follow", "unfollow", "likes", "help", "reload", "attach", "detach", "pinned", "cat", "play", "translate", "read", "version", "local", "public", "block", "unblock", "unlike", "home"}
 
 func processInput(input string) (command string, arguments string, found bool) {
 
--- a/help.go
+++ b/help.go
@@ -18,6 +18,7 @@
   /unlike <index>              Unfavorite status by index.
   /thread <index>              View thread the indexed status is part of.
   /cat <index>                 Output a status with details (liker, replies, etc).
+  /home                        Open timeline page.
   /public                      Open federated timeline page.
   /local                       Open instance local timeline page.
   /open <index>                Open indexed status in the system web browser.
--- a/main.go
+++ b/main.go
@@ -241,11 +241,14 @@
 				fmt.Print(hc.page.String())
 				hc.pause(true)
 				return
+			case "home":
+				hc.page = &Page{}
+				getter := &BasicStatusGetter{getter: hc.client.GetTimelineHome}
+				hc.page.loader = &StatusPages{hc: hc, getter: getter}
+				fmt.Print(hc.page.String())
+				hc.pause(true)
+				return
 			case "local":
-				if arguments != "" {
-					hc.dispatchStatus(arguments, "direct")
-					return
-				}
 				hc.page = &Page{}
 				localAPI := func(ctx context.Context, pg *mastodon.Pagination) ([]*mastodon.Status, error) {
 					return hc.client.GetTimelinePublic(ctx, true, pg)
@@ -256,10 +259,6 @@
 				hc.pause(true)
 				return
 			case "public":
-				if arguments != "" {
-					hc.dispatchStatus(arguments, "direct")
-					return
-				}
 				hc.page = &Page{}
 				localAPI := func(ctx context.Context, pg *mastodon.Pagination) ([]*mastodon.Status, error) {
 					return hc.client.GetTimelinePublic(ctx, false, pg)
--