limbusart/utils/twitter-filter.sh
2023-07-17 13:58:47 +03:00

1 line
400 B
Bash

jq -r '.messages[] | select(.embeds[0].thumbnail.url | if type == "string" then test("video") else false end | not) | .content | select(test("//twitter.com")) | select(test("@") | not) | select(test("\\|\\|") | not) | select(test("^(https?|ftp):\\/\\/[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,})(:[0-9]+)?(\\/[^ \\t\\r\\n]*)?$")) | split("/") | .[:6] | join("/") | split("?") | .[0]' limb.json > test.txt