Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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)