What is Nostr?
Joel Carnat ♑ 🐘 /
npub1833…vffd
2024-06-30 11:52:21

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?
Author Public Key
npub183354du5s8emag94u4rgj6wse9m35e3stc980hhmz5z2fqx7hwsszyvffd