brilliant. does this spin up a heavy DOM implementation in the background or do something lighter such as regexp?
Htmlq: like jq, but for html
11–20 of 172 posts
Re: Htmlq: like jq, but for html
#12brilliant. does this spin up a heavy DOM implementation in the background or do something lighter such as regexp?
Re: Htmlq: like jq, but for html
#13brilliant. does this spin up a heavy DOM implementation in the background or do something lighter such as regexp?
You can’t parse HTML with regexps. It’s not a regular language.
Re: Htmlq: like jq, but for html
#14brilliant. does this spin up a heavy DOM implementation in the background or do something lighter such as regexp?
https://stackoverflow.com/questions/1732348/regex-match-open...
Re: Htmlq: like jq, but for html
#15Re: Htmlq: like jq, but for html
#16Re: Htmlq: like jq, but for html
#17Nice! This is the kind of obvious tool that once it exists, you can’t really grok the fact it did not earlier, and that it took until now to exist.
Re: Htmlq: like jq, but for html
#18Nice! This is the kind of obvious tool that once it exists, you can’t really grok the fact it did not earlier, and that it took until now to exist.
> grok A good opportunity to introduce `gron` to those unfamiliar! ▶ gron "https://api.github.com/repos/tomnomnom/gron/commits?per_page=1" | fgrep "commit.author" json[0].commit.author = {}; json[0].commit.author.date = "2016-07-02T10:51:21Z"; json[0].commit.author.email = "mail@tomnomnom.com"; json[0].commit.author.name = "Tom Hudson"; https://github.com/tomnomnom/gron
Thank you - appreciated.
I haven't done much work with json but have had reasons recently to do so - and I immediately saw how difficult it was to pipeline to grep ...
But what I still don't understand is that some json outputs I see have multiple values with the exact same name (!) and that still seems "un-grep-able" to me ...
What am I missing ?
Re: Htmlq: like jq, but for html
#19Why not incorporate this into jq itself, like perhaps adding some command line arguments to switch to HTML mode?
Re: Htmlq: like jq, but for html
#20Nice! This is the kind of obvious tool that once it exists, you can’t really grok the fact it did not earlier, and that it took until now to exist.
There are already tools for xpath, but using css selectors is much more aligned with what I write every day, so that's nice.