Run (simple) manipulations on HTML files, like extracting parts. Use CSS selectors to define which parts of the HTML to operator on, use different commands in pipes to perform the desired operations.
The basic syntax is:
(COMMAND SELECTOR) | (COMMAND SELECTOR)
Some COMMAND use sub-pipelines, those would be written as follows:
(COMMAND SELECTOR {(COMMAND SELECTOR) | (COMMAND SELECTOR)})
The SELECTOR is a CSS selector, wrapped in
either ", ' or ? (as to reduce the necessity of escaping to a minimum).
Planned commands:
ONLY: remove everything not matching the CSS selector (alias: SELECT)WITHOUT: remove everything matching the CSS selector (alias: FILTER)Currently supported:
ONLYWITHOUTThe binary is called hse and supports following options:
```
USAGE:
hse [OPTIONS]
ARGS:
OPTIONS:
-h, --help Print help information
-i, --input File name of the Input. - for stdin (default)
-o, --output
```shell
hse -i index.html '(ONLY ?header .content?)' ```
```shell
<main> or element with CSS class main, but without any <script> defined insidehse -i index.html '(ONLY ?main, .main?) | (WITHOUT ?script?)' ```