Metadata-Version: 2.1
Name: html-dom-visualize
Version: 0.1.0
Summary: A simple HTML to Tree Diagram library that outputs HTML DOM as image for visualization.
License: MIT
Author: lokwkin
Author-email: lokwkin@gmail.com
Requires-Python: >=3.12,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: beautifulsoup4 (>=4.12.3,<5.0.0)
Requires-Dist: plotly (==5.22.0)
Requires-Dist: requests (>=2.32.3,<3.0.0)
Description-Content-Type: text/markdown

# html-dom-visualize
A simple HTML to Tree Diagram library that outputs HTML DOM as image for visualization. Supports custom elements filtering and masking.

Useful when analyzing elements composition of HTML documents or developing tools that manipulates HTML DOM structures.

## Using in Command line
```
```

```sh
options:
  -h, --help            show this help message and exit
  -f FILE, --file FILE  Path to local HTML file to analyze
  -u URL, --url URL     URL of the HTML page to analyze
  -b BRANCH, --branch BRANCH
                        Element tags that if included, their
                        ancestors and all their descendants
                        would be preserved. Multiple tags can
                        be specified If not specified, all
                        elements will be preserved.
  -m MASK, --mask MASK  Element tags that if included, they
                        will be masked from the output graph
                        such that their children will be
                        removed, and only the inner texts will
                        be preserved. Multiple tags can be
                        specified. If not specified, no tags
                        will be masked.

example:
# only include branches that contains <button> / <input>
# mask out children inside <button> and <a>
python main.py -f ./webpage.html -b button -b input -m a -m b 

# load from URL
python main.py -u https://google.com
```
