web-grep

What this?

Grep for HTML or XML.

```bash $ echo 'Hello' | web-grep '{}' Hello

List up all

-innerHTML

$ cat << EOM | web-grep '

{}

'

hello

world

EOM hello world # filtering with attribute $ cat << EOM | web-grep '

{}

'

hello

world

EOM world # Place-holder {} can be attribute $ cat << EOM | web-grep '

world

'

hello

world

EOM here ``` ## How this? This is a just CLI for an awesome library, [tanakh/easy-scraper](https://github.com/tanakh/easy-scraper). ## Installation 1. Install cargo - Recommended Way: Install [rustup](https://rustup.rs/) 1. Then, `cargo install web-grep` ## Usage ``` $ web-grep ``` The `query` is HTML pattern. Patterns like ```html

{}

``` ```html

{}

```

web-grep outputs all text for {}.

(Note: the original library easy-scraper use {{xxx}} for placeholders, but this CLI use only {})