html-query
html-query copied to clipboard
Feature: Implement echo with no query
When not passing anything to hq, it should echo back the HTML it received, potentially even with some formatting, a la jq, instead of current behavior which is to error.
$ curl -s https://example.com | hq
error: the following required arguments were not provided:
<QUERY>
Usage: hq <QUERY> [INPUT_FILE]
For more information, try '--help'.
It'd be fine to also implement jq . as hq {} or such - as a way to verify that the HTML itself is parseable, prior to trying to apply a query.