A browser console tool for inspecting, wrangling, and manipulating DOM and HTML in command line / terminal.
npm install -g dvt
<div>
<p>lorem</p>
<ul>
<li id="one">ipsum</li>
<li id="one">dolor</li>
<li id="one">sit</li>
</ul>
<span>annie</span>
</div>
Select what you want
$ cat example.html | dvt '$$("li").map(e=>e.textContent)'
ipsum
dolor
sit
Remove what you don't
$ cat example.html | dvt '$$("li").forEach(e=>e.remove())'
<div>
<p>lorem</p>
<ul>
</ul>
<span>annie</span>
</div>