Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/2fd/xhtml
filter and sanitization command line for HTML
https://github.com/2fd/xhtml
Last synced: 29 days 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 3 years ago)
- Default Branch: master
- Last Pushed: 2021-02-28T08:17:05.000Z (over 3 years ago)
- Last Synced: 2024-04-08T13:14:04.155Z (7 months 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
```![help command](example-help.png)
## Filtering tags
```bash
curl -s https://github.com | xhtml -s "meta[property]"
curl -s https://github.com | xhtml -selector "meta[property]"
```![meta](example-filter-meta.png)
## Limiting depth output
```bash
curl -s https://github.com | xhtml -s "strong" -d 0
curl -s https://github.com | xhtml -selector "strong" -depth 0
```![meta](example-hide-child.png)
## 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
```![meta](example-no-color.png)