mgdm / htmlq

Like jq, but for HTML.
MIT License
7k stars 107 forks source link

Long options in documentation #10

Closed stuartlangridge closed 2 years ago

stuartlangridge commented 2 years ago

A suggestion: it might be nice if the documentation used long options by default. I think all of these look clearer: they're more self-documenting, so it's much more obvious what each one does. (If I see -t and it's extracting the text, I end up thinking "ah, I bet the -t stands for --text, and if the docs used the long options then I'd know that already without having to reverse-engineer it in my head.)

$ curl --silent https://www.rust-lang.org/ | htmlq --attribute href a
$ curl --silent https://nixos.org/nixos/about.html | htmlq  --text .main
$ curl --silent https://mgdm.net | htmlq --pretty '#posts'

It's also subtle encouragement to others to use long options when describing htmlq, which makes everyone else's articles about it slightly more friendly and slightly less impenetrably techie, perhaps.