From d8d40acfd17dfe28654f7acfac648a896033b63b Mon Sep 17 00:00:00 2001 From: grunfink Date: Mon, 19 Jan 2026 15:53:19 +0100 Subject: New command-line option 'refresh'. --- main.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'main.c') diff --git a/main.c b/main.c index 4ba9796..e7d5b0d 100644 --- a/main.c +++ b/main.c @@ -77,7 +77,8 @@ int usage(const char *cmd) "list_remove {basedir} {uid} {name} Removes an existing list\n" "list_add {basedir} {uid} {name} {acct} Adds an account (@user@host or actor url) to a list\n" "list_del {basedir} {uid} {name} {actor} Deletes an actor URL from a list\n" - "top_ten {basedir} {uid} [{N}] Prints the most popular posts\n"; + "top_ten {basedir} {uid} [{N}] Prints the most popular posts\n" + "refresh {basedir} {uid} Refreshes all actors\n"; if (cmd == NULL) printf("%s", cmds); @@ -369,6 +370,20 @@ int main(int argc, char *argv[]) return 0; } + if (strcmp(cmd, "refresh") == 0) { /** **/ + xs *fwers = follower_list(&snac); + xs *fwing = following_list(&snac); + const char *id; + + xs_list_foreach(fwers, id) + enqueue_actor_refresh(&snac, id, 0); + + xs_list_foreach(fwing, id) + enqueue_actor_refresh(&snac, id, 0); + + return 0; + } + if ((url = GET_ARGV()) == NULL) return usage(cmd); -- cgit v1.2.3