Join Nostr
2025-01-07 04:02:14 UTC

Duncan Bayne on Nostr: I just discovered htmlq (think jq but for HTML not JSON) and it's great! for url in ...

I just discovered htmlq (think jq but for HTML not JSON) and it's great!

for url in $(cat ~/tmp/urls.txt)
do
echo $url
curl --silent -H "Accept: text/html" $url | htmlq "meta[property^='og:']"
echo
done

... generates me a nice summary of the OpenGraph tags for each URL in urls.txt.

#shell #cli #html #rust