summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <git@lassul.us>2023-06-10 22:38:40 +0200
committerlassulus <git@lassul.us>2023-06-11 16:03:33 +0200
commitab0812fa5ac2a3d378a3eaa155ef734aa2a3b196 (patch)
treeba841e12ecbe6904fc3c380e1dcec32b817abe94
parentf227bcea9ed621c2e54e3c77e939dcae0a629eb6 (diff)
reaktor2: use new bing api
-rw-r--r--krebs/2configs/reaktor2.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/krebs/2configs/reaktor2.nix b/krebs/2configs/reaktor2.nix
index 67c2dd4cd..45ff61baf 100644
--- a/krebs/2configs/reaktor2.nix
+++ b/krebs/2configs/reaktor2.nix
@@ -77,7 +77,7 @@ let
if [ "$?" -ne 0 ]; then
report_error "$response"
else
- if ! text=$(printf '%s' "$response" | jq -er '.item.messages[1].text'); then
+ if ! text=$(printf '%s' "$response" | jq -er '.item.messages[-1].text'); then
echo "$_from: $(report_error "$response")"
exit 0
fi
@@ -85,7 +85,7 @@ let
echo "$_from: $text" | fold -s -w 426
printf '%s' "$response" |
- jq -r '[.item.messages[1].sourceAttributions[].seeMoreUrl] | to_entries[] | "[\(.key + 1)]: \(.value)"'
+ jq -r '[.item.messages[-1].sourceAttributions[].seeMoreUrl] | to_entries[] | "[\(.key + 1)]: \(.value)"'
fi
'';
};
@@ -158,6 +158,7 @@ let
'';
};
};
+
interrogate = {
pattern = "^!interrogate (.*)$";
activate = "match";