2021-11-14 16:34:47 +01:00
|
|
|
;; get a list of people you are following
|
2021-11-14 13:44:58 +01:00
|
|
|
;; Copyright © 2021 cage
|
|
|
|
|
|
|
|
;; This program is free software: you can redistribute it and/or modify
|
|
|
|
;; it under the terms of the GNU General Public License as published by
|
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
;; (at your option) any later version.
|
|
|
|
|
|
|
|
;; This program is distributed in the hope that it will be useful,
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
|
|
|
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
;; usage:
|
|
|
|
|
|
|
|
;; after configuring tinmop (https://www.autistici.org/interzona/tinmop.html)
|
|
|
|
;; tinmop -e get-following.lisp > follows.csv
|
|
|
|
|
|
|
|
(in-package :scripts)
|
|
|
|
|
|
|
|
(defun connect ()
|
|
|
|
(client:init)
|
|
|
|
(client:authorize))
|
|
|
|
|
|
|
|
(defun main ()
|
|
|
|
(connect)
|
|
|
|
(db-utils:with-ready-database (:connect t)
|
2023-10-14 10:59:28 +02:00
|
|
|
(let* ((local-server-name (swconf:config-server-name))
|
2023-09-27 17:37:33 +02:00
|
|
|
(user-acct (api-client:local-user-acct))
|
|
|
|
(follows-accounts (api-client:get-following user-acct)))
|
2021-11-14 13:44:58 +01:00
|
|
|
(loop for account in follows-accounts do
|
|
|
|
(let ((acct (tooter:account-name account)))
|
|
|
|
(if (scan "@" acct)
|
|
|
|
(format t "~s~%" acct)
|
|
|
|
(format t "\"~a@~a\"~%" acct local-server-name)))))))
|
|
|
|
|
|
|
|
(main)
|