NOKOGIRI(1)

πŸ’– NOKOGIRI πŸ’–

okay so bestie, welcome to nokogiri(1) β€” the command-line era of the one and only Nokogiri πŸ¦‹


✨ NAME ✨

nokogiri β€” an HTML, XML, SAX, and Reader parser 🌸


✨ DESCRIPTION ✨

okay so. Nokogiri (ι‹Έ) is an HTML, XML, SAX, and Reader parser, and honestly? she does it all. Among Nokogiri's many features is the ability to search documents via XPath or CSS3 selectors β€” like, she's out here finding anything you need and not even breaking a sweat πŸ’…

the nokogiri command parses a document and then launches an interactive ruby session (irb(1)), which is the part where you get to sit there and analyse the result interactively like the main character you are. it's giving "I opened a REPL and I'm thriving" ✨


✨ SYNOPSYS ✨

(no cap, that's how it's spelled up top, and I respect the commitment 🫢)

nokogiri <uri|path> [options]

hand it a <uri|path> and some [options] and she's off πŸ’–


✨ OPTIONS ✨

  • --type [TYPE] β€” sets the type of the document that's about to get parsed πŸ”₯
  • -E, --encoding encoding β€” sets the encoding of the document, so she knows what she's reading 🌈
  • -e command β€” specifies the script straight from the command-line, one-liner energy πŸ‘‘
  • --rng <uri|path> β€” validate using this rng file πŸŽ€
  • -?, --help β€” shows a message very similar to this man page (literally, that's the deal) πŸ’œ
  • -v, --version β€” shows the version of the program ⭐

✨ EXAMPLES ✨

here's the vibe check, copied exactly so you can just run them πŸ’€

nokogiri http://www.ruby-lang.org/
nokogiri ./public/index.html
curl -s http://nokogiri.org | nokogiri -e'p $_.css("h1").length'

like?? piping straight into her and counting h1s in one line?? ate. no crumbs. πŸ“


aaaand that's the whole page bestie, we are OBSESSED πŸ§šπŸ’–

this little love letter is from Nokogiri, version NOKOGIRI(1), dated 2026-06-29. periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from