summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2025-07-20 21:45:09 -0400
committerJune McEnroe <june@causal.agency>2025-07-20 21:45:09 -0400
commit54a31c924edc1b98d631389993feca36079f8ee0 (patch)
tree98a3055ef3807b0138172142939bc39aa645a270
parentAdd Spear (diff)
downloadsrc-54a31c924edc1b98d631389993feca36079f8ee0.tar.gz
src-54a31c924edc1b98d631389993feca36079f8ee0.zip
Add script to search mastodon archive outbox.json HEAD master
Diffstat (limited to '')
-rwxr-xr-xhome/.local/bin/masto12
1 files changed, 12 insertions, 0 deletions
diff --git a/home/.local/bin/masto b/home/.local/bin/masto
new file mode 100755
index 00000000..9fdbfdf1
--- /dev/null
+++ b/home/.local/bin/masto
@@ -0,0 +1,12 @@
+#!/bin/sh
+set -eu
+
+outbox=$1
+pattern=$2
+
+jq -r "
+	.orderedItems[] |
+	select(.object | type == \"object\") | .object |
+	select(.content | test(\"${pattern}\")) |
+	\"\\(.content)\\n\\(.url)\\n\"
+" "$outbox" | dehtml