Skip to content
/ dvt Public

A command line tool for working with DOM using JavaScript

Notifications You must be signed in to change notification settings

nntrn/dvt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dvt



npm version

A browser console tool for inspecting, wrangling, and manipulating DOM and HTML in command line / terminal.

Install

npm install -g dvt

Examples

<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>

About

A command line tool for working with DOM using JavaScript

Topics

Resources

Stars

Watchers

Forks