Strip tags from HTML, optionally from areas identified by CSS selectors
Project description
strip-tags
Strip tags from HTML, optionally from areas identified by CSS selectors
Installation
Install this tool using pip
:
pip install strip-tags
Usage
Pipe content into this tool to strip tags from it:
cat input.html | strip-tags > output.txt
Or pass a filename:
strip-tags input.html > output.txt
To run against just specific areas identified by CSS selectors:
strip-tags -s '.content' input.html > output.txt
This can be called with multiple selectors:
strip-tags -s '.content' -s '.sidebar' input.html > output.txt
You can also use:
python -m strip_tags --help
Development
To contribute to this tool, first checkout the code. Then create a new virtual environment:
cd strip-tags
python -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
pytest
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
strip-tags-0.1.tar.gz
(7.1 kB
view details)