From e2f2779c3c1e3bc1f32477fb6f85337d14cf725e Mon Sep 17 00:00:00 2001 From: deekim Date: Tue, 10 Oct 2017 19:00:49 -0400 Subject: [PATCH] fixup! pup: add page --- pages/common/.pup.md.swp | Bin 0 -> 12288 bytes pages/common/pup.md | 16 ++++++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 pages/common/.pup.md.swp diff --git a/pages/common/.pup.md.swp b/pages/common/.pup.md.swp new file mode 100644 index 0000000000000000000000000000000000000000..4427c795ae39b7ef81d7a4e12e5389576def3be1 GIT binary patch literal 12288 zcmYc?2=nw+FxN9-U|?VnU|={La5u8S<1d51I0HjUVxC@hW-dquFHXtM%+<|J!m9=( zSqC*xzdXMvySN}RIaR+TC#6WgATd3)SU)*GH#a{|zo4{0FE<6Gd=!s{z-S0iH3WDW zjExKpKt?JnDJlpHg@Tx)cr*k?Ltr!nMnhmU1V%$(Gz3ONU^E0qLtuo2KuG~3Lp=in z0~6H0(omWajfQeZsnHM^4S~@R7!85Z5Eu=C(GVC7fzc2c4S~@R7!85Z5Eu=CAs7OQ zDGUsrybKH%c_H)vu>Suqeg=l0{0t1&`573l@iQ>=@G~%U^D{7H@G~%^^D{8G@G~$t z^D{8W@iQ>U@-r}S@G~&5^D{8q=VM^F$H&01hmV0_Hy;B-2Ok4NJ0Ams6CVSEBOe2U zC?5lZ2pXgi~+FFII;{3eoTJ;1523>`K zqRhM!1&9# zO@SDnnv)pUM zK+I37R7fl-DauSLElE`!$QWY}uO7ayF6_RsO6Z2A2bQD1Gn^yv2 zfr1lkLTZWvNNZw=6$68vf^&XuE=VdTGcOflPC;T(ab{k+LP>spjvfPpGAL0n006?P B^P&I% literal 0 HcmV?d00001 diff --git a/pages/common/pup.md b/pages/common/pup.md index 593ecb5d1..a9fd3f5f6 100644 --- a/pages/common/pup.md +++ b/pages/common/pup.md @@ -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{}'`