mirror of https://github.com/CrimsonTome/tldr.git
fixup! pup: add page
parent
3dd8f82127
commit
e2f2779c3c
Binary file not shown.
|
@ -1,27 +1,27 @@
|
|||
# pup
|
||||
|
||||
> HTML parsing tool.
|
||||
> Command line HTML parsing tool.
|
||||
|
||||
- Transform raw HTML file into a cleaned, indented, and colored format:
|
||||
- Transform a raw HTML file into a cleaned, indented, and colored format:
|
||||
|
||||
`cat {{index.html}} | pup --color`
|
||||
|
||||
- Filter HTML by element tag name:
|
||||
|
||||
`cat {{index.html}} | pup '{{tag}}'`
|
||||
`cat {{index.html}} | pup '{{div}}'`
|
||||
|
||||
- Filter HTML by id:
|
||||
|
||||
`cat {{index.html}} | pup '{{tag#id}}'`
|
||||
`cat {{index.html}} | pup '{{div#id}}'`
|
||||
|
||||
- Filter HTML by attribute value:
|
||||
|
||||
`cat {{index.html}} | pup '{{tag[attribute="value"}}'`
|
||||
`cat {{index.html}} | pup '{{input[type="text"}}'`
|
||||
|
||||
- Print all text from selected nodes and children:
|
||||
- Print all text from the filtered HTML elements and their children:
|
||||
|
||||
`cat {{index.html}} | pup '{{tag}} text{}'`
|
||||
`cat {{index.html}} | pup '{{div}} text{}'`
|
||||
|
||||
- Print HTML as JSON:
|
||||
|
||||
`cat {{index.html}} | pup '{{tag}} json{}'`
|
||||
`cat {{index.html}} | pup '{{div}} json{}'`
|
||||
|
|
Loading…
Reference in New Issue