- Notifications
You must be signed in to change notification settings - Fork5
A HTML processor inspired by jq
License
NotificationsYou must be signed in to change notification settings
coderobe/hq
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A HTML processor inspired by jq (https://github.com/stedolan/jq)
- meson
- modest (https://github.com/lexborisov/Modest)
meson build && ninja -C build
The executable will be built tobuild/hq
.
- modest (https://github.com/lexborisov/Modest)
hq (html query) - commandline HTML processor © Mara Robin Broda, 2018Usage: build/hq [options] <selector> <mode> [mode argument]Options: -h, --help show this text -f, --file <file> file to read (defaults to stdin) -d, --delimiter <delim> delimiter character to use between results (defaults to newline) -0, --null uses \0 as delimiter <selector> CSS selector to match against <mode> processing mode may be one of { data, text, attr }: data - return raw html of matching elements text - return inner text of matching elements [mode argument: formatting] supported modes: { plain, ansi, md } default: plain for plain, ANSI, or markdown formatted output respectively attr - return attribute value of matching elements <mode argument: attr> attribute to returnExamples: curl -sSL https://example.com | build/hq a data curl -sSL https://example.com | build/hq a attr href
curl -s https://coderobe.net | hq a data
<a href="https://keybase.io/coderobe">Keybase (coderobe)</a><a href="https://github.com/coderobe">Github (coderobe)</a><a href="https://twitter.com/coderobe">Twitter (coderobe)</a>
curl -s https://coderobe.net | hq a text
Keybase (coderobe)Github (coderobe)Twitter (coderobe)
curl -s https://coderobe.net | hq a attr href
https://keybase.io/coderobehttps://github.com/coderobehttps://twitter.com/coderobe
You get the idea.
This work, written by Mara Robin Broda (coderobe) in 2018, is licensed under the terms of the GNU Affero General Public License v3.0
About
A HTML processor inspired by jq
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published