From a8db4ab8a85f862860e2bc19d31746609b95023c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Sun, 26 Mar 2023 00:41:55 +0100 Subject: [PATCH] fix(panoptikon): tellonym has ads now --- systems/ful/panoptikon.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/systems/ful/panoptikon.nix b/systems/ful/panoptikon.nix index f3896eb..90e4dbd 100644 --- a/systems/ful/panoptikon.nix +++ b/systems/ful/panoptikon.nix @@ -111,7 +111,18 @@ in { reporters = [reporters.irc-kmein]; }; fxght-or-flxght = { - script = urlJSON "https://api.tellonym.me/profiles/name/fxght.or.flxght?limit=20"; + script = pkgs.writers.writeDash "watch-url-json" '' + ${pkgs.curl}/bin/curl -sSL 'https://api.tellonym.me/profiles/name/fxght.or.flxght?limit=20' \ + | ${pkgs.jq}/bin/jq '.answers | map( + select(.type == "answer") + | { + question: .tell, + answer: .answer, + date: .createdAt, + media: .media | map(.url) + } + )' + ''; reporters = [reporters.irc-kmein]; }; };