From b5541f5e3fe29fba0acd480ea9c3bcbf36c70085 Mon Sep 17 00:00:00 2001 From: mousebot Date: Sat, 8 May 2021 10:06:53 +0200 Subject: add toot/follows/followers counts to profile buffer --- lisp/mastodon-profile.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'lisp/mastodon-profile.el') diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el index bf6007f..a5fb1a9 100644 --- a/lisp/mastodon-profile.el +++ b/lisp/mastodon-profile.el @@ -107,7 +107,10 @@ following the current profile." id endpoint-type))) (buffer (concat "*mastodon-" acct "-" endpoint-type "*")) (note (mastodon-profile--account-field account 'note)) - (json (mastodon-http--get-json url))) + (json (mastodon-http--get-json url)) + (fol_count (mastodon-tl--as-string (mastodon-profile--account-field account 'followers_count))) + (folling_count (mastodon-tl--as-string (mastodon-profile--account-field account 'following_count))) + (toots_count (mastodon-tl--as-string (mastodon-profile--account-field account 'statuses_count)))) (with-output-to-temp-buffer buffer (switch-to-buffer buffer) (mastodon-mode) @@ -137,6 +140,13 @@ following the current profile." 'face 'default) "\n ------------\n" (mastodon-tl--render-text note nil) + (mastodon-tl--set-face + (concat " ------------\n" + "TOOTS: " toots_count " | " + "FOLLOWERS: " fol_count " | " + "FOLLOWING: " folling_count "\n" + " ------------\n\n") + 'success) (mastodon-tl--set-face (concat " ------------\n" endpoint-name "\n" -- cgit v1.2.3