jdamian / html-tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

html-tool

Take URLs or filenames for HTML documents on stdin and extract tag contents, attribute values, or comments.

Install

▶ go get -u github.com/tomnomnom/hacks/html-tool

Usage

▶ html-tool 
Accept URLs or filenames for HTML documents on stdin and extract parts of them.

Usage: html-tool <mode> [<args>]

Modes:
	tags <tag-names>        Extract text contained in tags
	attribs <attrib-names>  Extract attribute values
	comments                Extract comments

Examples:
	cat urls.txt | html-tool tags title a strong
	find . -type f -name "*.html" | html-tool attribs src href
	cat urls.txt | html-tool comments

TODO

About


Languages

Language:Go 100.0%