GitXplorerGitXplorer
m

hq

public
1 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
d901fe411d8dfa4fd50eafd7ac367546f39c2e84

clarify --number arg

mmightyguava committed 5 years ago
Unverified
b29ad9079233e483cf7079d4853d409b55998404

fix reading from stdin

mmightyguava committed 5 years ago
Unverified
17ad5d7ddd6164a9ab3afbfb2ef64ac3ac55beb1

add ::text and ::attr pseudoselectors

mmightyguava committed 5 years ago
Unverified
c5429c24057f7b35ec0c4b1576dd38c853e0b2e0

add --text and --number

mmightyguava committed 5 years ago
Unverified
2ce47dad6a77bd1aa5be27cae2f2f189276dcf37

initial implementation

mmightyguava committed 5 years ago
Verified
524b85233c5ffa07c51cf422845ef5f70c9e2f29

Initial commit

mmightyguava committed 5 years ago

README

The README file for this repository.

hq

HTML query CLI using CSS selectors, built on top of Cascadia.

Installation

go get github.com/mightyguava/hq

Usage

hq 'div.class_name' test.html
cat test.html | hq 'div.class_name'

Special pseudo-selectors

Use the ::text pseudo-selector to recursively print the text nodes of matching nodes instead of rendering their HTML. Its behavior is the same as setting --text.

Use the ::attr(<attr>) pseuo-selector to print the value of a matching attribute in the matching nodes instead of than rendering the their html. For example, ::attr(href) prints the href value of the matching nodes. Each match is printed on a separate line. Non-matching nodes are skipped.