# pup
#
# Command line too for processing HTML
# Reading from stdin, pup prints to stdout, allowing the user to filter parts
# of the page using CSS selectors.
# Install pup. Requires `go`.
go install github.com/ericchiang/pup
# Indent and colorize HTML.
cat file.html | pup --color
# Filter by tag.
cat file.html | pup 'title'
# Pseudoclass: filter by content "History".
cat file.html | pup ':contains("History")'
# Multiple groups of selectors.
cat file.html | pup 'title, h1 span[dir="auto"]'