SFEED_WEB(1)

πŸ“¦
version 2.4 Β· 2 versions
, in alpine 3.24, debian trixie, nixos 26.05, nixpkgs unstable, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– SFEED_WEB πŸ’–

okay so bestie, welcome to sfeed_web, a lil tool from the General Commands Manual section (that's manual page 1, iykyk) and it's genuinely iconic. it does exactly one thing and it slays at it. let's get into it πŸ’…


✨ NAME ✨

sfeed_web β€” finds URLs to feeds from a HTML webpage πŸ¦‹


🌸 SYNOPSIS 🌸

sfeed_web [baseurl]

πŸŽ€ DESCRIPTION πŸŽ€

okay so here's the vibe: sfeed_web reads the HTML data of the webpage from stdin and writes the found URLs to stdout. that's it. that's the whole main character moment. no cap. 🌈

and like, such a link reference in HTML code looks like this, periodt:

<link rel="alternate" href="atom.xml" type="application/atom+xml" />

so it's sniffing through your HTML looking for these lil <link> tags and pulling out the feed links like the absolute detective it is πŸ•΅οΈβ™€οΈβœ¨


πŸ’… OPTIONS πŸ’…

  • baseurl β€” an optional base URL to use for found feed URLs that are relative. like, if your feed links are all "atom.xml" and "feed.rss" with no domain in front, this is the domain you hand over so everything gets stitched together correctly 🧚

🌟 OUTPUT FORMAT 🌟

url<TAB>content-type<newline>

okay so each line is: the url, then a literal <TAB>, then the content-type, then a <newline>. two fields, tab separated, no drama πŸ’–

  • URL β€” the found relative or absolute URL. πŸŽ€
    • for relative URLs: if a <base href="..." /> tag is found, that gets used. otherwise, if the baseurl option is specified, that gets used. and if neither are set, then the relative URL is just printed as-is, raw, unbothered, exactly how it came πŸ‘‘
  • content-type β€” usually application/atom+xml or application/rss+xml. those are the two you'll see like 99% of the time, bestie πŸ¦‹

πŸ”₯ EXIT STATUS πŸ”₯

the sfeed_web utility exits 0 on success, and >0 if an error occurs. so zero is the happy path, anything bigger means something went sideways 😭


πŸ“ EXAMPLES πŸ“

get URLs from a website:

curl -s -L 'https://codemadness.org/' | sfeed_web 'https://codemadness.org/'

look at that pipe. look at it. curl grabs the page, sfeed_web chews through it and spits out the feed URLs. chef's kiss, ate, no crumbs 🫢


🌈 SEE ALSO 🌈


πŸ’œ AUTHORS πŸ’œ

Hiltjo Posthuma <hiltjo@codemadness.org>


and that's the whole page bestie!! this lil icon came to you from Debian, dated July 27, 2021, and it lives in the SFEED_WEB(1) corner of the manual. go forth and find some feeds, you absolute legend πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from