jquery-cli2
![License: GPLv3+](http://img.shields.io/badge/license-GPLv3%2B-brightgreen.svg)
Before using this, you should probably consider:
- pup - Parsing HTML at the command line
- Xidel - HTML/XML data extraction tool
Installation
npm install --global jquery-cli2
Usage
cat categories.htm | jquery-cli2 --selector '#menu > ul > li > a' -c | paste -s -d+ | bc
cat categories.htm | jquery-cli2 --selector '#menu > ul > li > a' -c | wc -l
cat file.html | jquery-cli2 --text '#menu > li a'
curl https://www.npmjs.org/package/jquery-cli2 | jquery-cli2 --text 'table.metadata td' | grep 'ago'
echo '<section><div><ul><li>testing</li></ul></div><section>' | jquery-cli2 --html div --no-trailing-line-break | jquery-cli2 --html ul --no-trailing-line-break
:free: License
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.