https://github.com/2fd/xhtml
filter and sanitization command line for HTML
https://github.com/2fd/xhtml
Last synced: 4 months ago
JSON representation
filter and sanitization command line for HTML
- Host: GitHub
- URL: https://github.com/2fd/xhtml
- Owner: 2fd
- License: mit
- Created: 2021-02-28T03:47:16.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-02-28T08:17:05.000Z (over 4 years ago)
- Last Synced: 2024-04-08T13:14:04.155Z (over 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 2.52 MB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# XHTML
HTML filter and sanitization cli tool
## Install
```bash
npm install -g xhtml-cli
```## Usage
```bash
xhtml --help
```
## Filtering tags
```bash
curl -s https://github.com | xhtml -s "meta[property]"
curl -s https://github.com | xhtml -selector "meta[property]"
```
## Limiting depth output
```bash
curl -s https://github.com | xhtml -s "strong" -d 0
curl -s https://github.com | xhtml -selector "strong" -depth 0
```
## No color output
```bash
curl -s https://github.com | xhtml -s "strong" -d 0 --no-color
curl -s https://github.com | xhtml -selector "strong" -depth 0 --no-color
```