I made something for you, Sup Forums. It's a simple script to search how often a piece text occurs on a Sup Forums board. More accurately, it's two scripts, one to download the all posts from a board and one to search them. To run the scripts you need jq 1.5 and curl, which are probably both in your distro's repos.
reposting this for the jq lovers it needs to be edited to not use printf, but it downloads an entire thread from url. 4dl() { board="$(printf -- '%s' "${1:?}" | cut -d '/' -f4)" thread="$(printf -- '%s' "${1:?}" | cut -d '/' -f6)" wget -qO- "a.4cdn.org/${board}/thread/${thread}.json" | jq -r ' .posts | map(select(.tim != null)) | map((.tim | tostring) + .ext) | map("
Jaxson Wilson
You can simplify the jq code to .posts[] | select(.tim != null) | (.tim | tostring) + .ext | "
Samuel Peterson
Nice. this is just a repost of something I found online, but I'll update my version at home. I also wrote versions for 8ch and lain based on it, I'll share if anyone's interested and the thread is alive when I get home
Matthew Kelly
>I'll share if anyone's interested Sure.
Carter Johnson
so only downloading a json file and sanitizing it?
Luke Anderson
Almost. It downloads several files and searches them for a regex.