pup
HTML parsing tool. tldr-pages
On several platforms
Several platforms
Transform a raw HTML file into a cleaned, indented, and colored format
cat index.html | pup --colorIdentifyFilter HTML by element tag name
cat index.html | pup 'tag'IdentifyFilter HTML by ID
cat index.html | pup 'div#id'IdentifyFilter HTML by attribute value
cat index.html | pup 'input[type="text"]'IdentifyPrint all text from the filtered HTML elements and their children
cat index.html | pup 'div text{}'IdentifyPrint HTML as JSON
cat index.html | pup 'div json{}'Identify