What does HackerNews think of htmlq?

Like jq, but for HTML.

Language: Rust

Hey, author here, happy to answer questions! A few other recent posts/tools that you may be interested in:

- sqlite-lines discussion from a few days ago: https://news.ycombinator.com/item?id=32288165

- htmlq, Rust CLI for (like jq but for html): https://github.com/mgdm/htmlq

- The Go library that sqlite-html uses for making runtime-loadable SQLite extensions https://github.com/riyaz-ali/sqlite

- sqlean, a ton of other helpful SQLite extensions (in C): https://github.com/nalgeon/sqlean

On that note, this is the shell alias I use to remember status codes (using htmlq https://github.com/mgdm/htmlq):

    alias status_codes="curl --silent https://developer.mozilla.org/en-US/docs/Web/HTTP/Status | htmlq --text 'dt a code'"
Prints something like this:

    100 Continue
    101 Switching Protocols
    102 Processing
    103 Early Hints
    200 OK
    201 Created
    202 Accepted
    203 Non-Authoritative Information
    204 No Content
    205 Reset Content
    206 Partial Content
    ...
To get specific groups, I do something like this:

    status_codes | grep ^2
Replacing 2 with whatever group you want, like 4 for 4xx codes for example
Ah, htmlq [1] is a missing one that's not on the list!

Straight from the repo: "Like jq, but for HTML."

I find it useful for quickly hacking scripts together and exploring data. Very useful for the iterative process of finding good CSS selectors with the data that I can get without javascript running.

--- [1] https://github.com/mgdm/htmlq