SFEED_JSON(1)

✨ SFEED_JSON πŸ’…

okay so bestie, welcome to sfeed_json β€” it's the glow-up your feed data has been waiting for. It takes your humble TSV feed data and turns it into JSON Feed energy. We're talking main character formatting, no cap. πŸ¦‹


🌸 SYNOPSIS 🌸

sfeed_json [file ...]

πŸ’– DESCRIPTION πŸ’–

So here's the tea: sfeed_json formats feed data (TSV) from sfeed(1) β€” reading from stdin or from each file you hand it β€” and writes it out to stdout as JSON Feed data. Slay. ✨

If you pass one or more file arguments, then the basename of the file gets used as the feed name in the output. Cute, right? πŸŽ€

If you pass no file arguments and the data just comes from stdin, then the feed name is empty. Nothing. Void. The feed name said "not today." πŸ’€

And here's a lil detail you need to know, bestie: if sfeed_json is reading from one or more file arguments, it will prefix the entry title with "[feed name] ". That's the literal feed name in square brackets followed by a space. Iconic little prefix, honestly. πŸ‘‘

ngl, that prefix only shows up in the multi-file situation β€” if it's just stdin, there's no feed name to put in there. Fr fr.

πŸ”₯ EXIT STATUS πŸ”₯

The sfeed_json utility exits 0 on success β€” we love a clean exit, we love a happy ending 🫢 β€” and >0 if an error occurs. So if the number is bigger than zero, something went wrong, and that's your sign. 😭


🌈 EXAMPLES 🌈

This is the whole vibe, right here:

curl -s 'https://codemadness.org/atom.xml' | sfeed | sfeed_json

Like. Chain those pipes. Fetch it, sfeed it, JSON it. Ate. πŸ’…


πŸ¦‹ SEE ALSO πŸ¦‹

Go read those too, bestie, they're part of the family. πŸ’œ


⭐ STANDARDS ⭐

JSON Feed Version 1.1, https://www.jsonfeed.org/version/1.1/, Nov, 2022. Yes, it follows a real standard, we're not just making this up. ✨


πŸ‘‘ AUTHORS πŸ‘‘

Hiltjo Posthuma <hiltjo@codemadness.org>


That's the whole page, and that's a wrap, bestie. This one shipped in the Debian edition, dated August 1, 2023 β€” so if you're reading it, you're reading SFEED_JSON(1) from that very manual. Go format something gorgeous. πŸ’–πŸŒΈπŸ§š

πŸ“¦ where this page comes from