Joel Carnat ♑ 🐘 on Nostr: Hey #jq users, Anyone knows how to turn a #JSON field containing HTML content into a ...
Hey #jq users,
Anyone knows how to turn a #JSON field containing HTML content into a clean text-only excerpt?
So far I did
jq -r '.[] | [ @uri "\(.status.content)" ]'
which gives me the URL-encoded content. But I don't get how to strip the HTML tags and only keep let's say 20 characters from that .status.content field.
Any clue?
Anyone knows how to turn a #JSON field containing HTML content into a clean text-only excerpt?
So far I did
jq -r '.[] | [ @uri "\(.status.content)" ]'
which gives me the URL-encoded content. But I don't get how to strip the HTML tags and only keep let's say 20 characters from that .status.content field.
Any clue?