shithub: masto9

Download patch

ref: 25ce6ea9a2e96fc6c056ed752561475a90fc0a05
parent: 45930f4521a779916b87d051065a8d2b751a7c12
author: Julien Blanchard <jblanchard@makemusic.com>
date: Wed Mar 29 13:04:41 EDT 2023

Load more with Send

--- a/masto9.c
+++ b/masto9.c
@@ -303,7 +303,7 @@
 }
 
 void
-display_toots(Toot toots[])
+display_toots(Toot toots[], char *server)
 {
   Biobuf out;
   Binit(&out, 1, OWRITE);
@@ -331,8 +331,8 @@
     }
     Bprint(&out, "\nReply[%s] | Boost[%s] | Favorite[%s]", toot.id, toot.id, toot.id);
   }
-  Bprint(&out, "\n");
-  Bprint(&out, "\nMore[%s]\n\n", toots[19].id);
+  Bprint(&out, "\n\n\n⇒ Send the next line to load more");
+  Bprint(&out, "\n6.out %s more %s\n\n", server, toots[19].id);
   Bflush(&out);
 }
 
@@ -364,7 +364,7 @@
   Bflush(&out);
 }
 
-//echo 'proto=pass service=mastodon server=instanceHostName pass=yourToken user=julienxx' > /mnt/factotum/ctl
+//echo 'proto=pass service=mastodon server=instanceHostName pass=yourToken user=yourUsername' > /mnt/factotum/ctl
 void
 main(int argc, char**argv)
 {
@@ -384,7 +384,7 @@
 
   if(command == nil) {
     get_timeline(token, toots, nil);
-    display_toots(toots);
+    display_toots(toots, server);
   } else if(strcmp(command, "toot") == 0) {
     text = argv[3];
     post_toot(token, text);
@@ -406,7 +406,7 @@
   } else if(strcmp(command, "more") == 0) {
     id = argv[3];
     get_timeline(token, toots, id);
-    display_toots(toots);
+    display_toots(toots, server);
   } else if(strcmp(command, "notifications") == 0) {
     get_notifications(token, notifs);
     display_notifications(notifs);