diff options
author | default <nobody@localhost> | 2024-08-29 07:08:26 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2024-08-29 07:08:26 +0200 |
commit | 1022f6db87ea196630972123601639beb190b4c3 (patch) | |
tree | e995c3fe584ef2ee99d5140556657f2aa2a94b62 /main.c | |
parent | 9a67b19a7cebb8f1ddaa3719d8f84386f0b380a0 (diff) |
Bookmarking can be done from the command line.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -39,6 +39,8 @@ int usage(void) printf("webfinger_s {basedir} {uid} {actor} Queries about an actor (@user@host or actor url)\n"); printf("pin {basedir} {uid} {msg_url} Pins a message\n"); printf("unpin {basedir} {uid} {msg_url} Unpins a message\n"); + printf("bookmark {basedir} {uid} {msg_url} Bookmarks a message\n"); + printf("unbookmark {basedir} {uid} {msg_url} Unbookmarks a message\n"); printf("block {basedir} {instance_url} Blocks a full instance\n"); printf("unblock {basedir} {instance_url} Unblocks a full instance\n"); printf("limit {basedir} {uid} {actor} Limits an actor (drops their announces)\n"); @@ -442,6 +444,26 @@ int main(int argc, char *argv[]) return 0; } + if (strcmp(cmd, "bookmark") == 0) { /** **/ + int ret = bookmark(&snac, url); + if (ret < 0) { + fprintf(stderr, "error bookmarking %s %d\n", url, ret); + return 1; + } + + return 0; + } + + if (strcmp(cmd, "unbookmark") == 0) { /** **/ + int ret = unbookmark(&snac, url); + if (ret < 0) { + fprintf(stderr, "error unbookmarking %s %d\n", url, ret); + return 1; + } + + return 0; + } + if (strcmp(cmd, "question") == 0) { /** **/ int end_secs = 5 * 60; xs *opts = xs_split(url, ";"); |