From c9c4cda5ba13fe971cea306bb4db806f313608fa Mon Sep 17 00:00:00 2001 From: JMARyA Date: Fri, 26 Apr 2024 08:11:28 +0200 Subject: [PATCH] add htmlq --- technology/applications/cli/htmlq.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 technology/applications/cli/htmlq.md diff --git a/technology/applications/cli/htmlq.md b/technology/applications/cli/htmlq.md new file mode 100644 index 0000000..165d8fa --- /dev/null +++ b/technology/applications/cli/htmlq.md @@ -0,0 +1,24 @@ +--- +obj: application +repo: https://github.com/mgdm/htmlq +rev: 2024-04-25 +--- + +# htmlq +Like [jq](jq.md), but for [HTML](../../internet/HTML.md). Uses [CSS](../../internet/CSS.md) selectors to extract bits of content from [HTML](../../internet/HTML.md) files. + +## Usage +Usage: `htmlq [FLAGS] [OPTIONS] [--] [selector]...` + +### Options +| Option | Description | +| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `-B, --detect-base` | Try to detect the base [URL](../../internet/URL.md) from the `` tag in the document. If not found, default to the value of `--base`, if supplied | +| `-w, --ignore-whitespace` | When printing text nodes, ignore those that consist entirely of whitespace | +| `-p, --pretty` | Pretty-print the serialised output | +| `-t, --text` | Output only the contents of text nodes inside selected elements | +| `-a, --attribute ` | Only return this attribute (if present) from selected elements | +| `-b, --base ` | Use this [URL](../../internet/URL.md) as the base for links | +| `-f, --filename ` | The input file. Defaults to stdin | +| `-o, --output ` | The output file. Defaults to stdout | +| `-r, --remove-nodes ...` | Remove nodes matching this expression before output. May be specified multiple times |