Skip to content
Branch: master
Find file History
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
.gitignore Adds html-tool Sep 5, 2018
README.md Adds help output, readme Sep 5, 2018
main.go Closes targets channel *after* being done writing to it Sep 5, 2018

README.md

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

You can’t perform that action at this time.