fixup! pup: add page

coverage
deekim 2017-10-10 19:00:49 -04:00
parent 3dd8f82127
commit e2f2779c3c
2 changed files with 8 additions and 8 deletions

BIN
pages/common/.pup.md.swp Normal file

Binary file not shown.

View File

@ -1,27 +1,27 @@
# pup # 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` `cat {{index.html}} | pup --color`
- Filter HTML by element tag name: - Filter HTML by element tag name:
`cat {{index.html}} | pup '{{tag}}'` `cat {{index.html}} | pup '{{div}}'`
- Filter HTML by id: - Filter HTML by id:
`cat {{index.html}} | pup '{{tag#id}}'` `cat {{index.html}} | pup '{{div#id}}'`
- Filter HTML by attribute value: - 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: - Print HTML as JSON:
`cat {{index.html}} | pup '{{tag}} json{}'` `cat {{index.html}} | pup '{{div}} json{}'`