SFEED_XMLENC(1)

πŸ’– SFEED_XMLENC πŸ’–

okay bestie, gather round, because this little cutie is a one-job icon and she does her job flawlessly πŸ’…

✨ NAME ✨

sfeed_xmlenc β€” get text-encoding from XML πŸ¦‹

like, that's it. that's the whole personality. she sniffs out the encoding and hands it to you. no cap.


πŸŽ€ SYNOPSIS πŸŽ€

sfeed_xmlenc

no flags. no arguments. no drama. she just exists and you pipe stuff into her. main character energy fr fr πŸ‘‘


🌸 DESCRIPTION 🌸

okay so here's the vibe: sfeed_xmlenc reads XML data from stdin and writes the found text-encoding to stdout. that's the whole flow. in goes XML, out goes the encoding name. periodt πŸ’–

and the way she's ✨picky✨ about the output? obsessed. she:

  • converts characters in the encoding-name to lowercase (because we do not do shouty uppercase around here, she's giving lowercase only πŸ’…)
  • strips characters which are not allowed in an encoding-name β€” if it doesn't belong, it's not coming through, sorry bestie πŸ™ˆ

so what you get out is a clean, lowercase, legal encoding name. chef's kiss. πŸ“


⭐ EXIT STATUS ⭐

  • 0 β€” success!! she did it!! slay!! πŸŽ‰
  • >0 β€” an error occurred 😭 something went sideways and she's telling you about it.
fr fr, if you get anything above zero, something's up. go check your input 🫢

🌈 EXAMPLES 🌈

wanna grab the text-encoding from an Atom feed? say less bestie:

curl -s -L 'https://codemadness.org/atom.xml' | sfeed_xmlenc

curl pipes the feed straight into her, and she hands back the encoding. iconic pipeline behaviour. no notes. πŸ’œ


πŸ¦‹ SEE ALSO πŸ¦‹

go read those too, iykyk πŸ“šβœ¨


πŸ’– AUTHORS πŸ’–

Hiltjo Posthuma <hiltjo@codemadness.org> β€” the legend, the moment, the icon πŸ‘‘


and that's the whole page, bestie!! this one came from the Debian build, dated July 25, 2021 β€” a vintage classic, lowkey timeless, she ate and left no crumbs πŸŽ€βœ¨πŸ’…

πŸ“¦ where this page comes from