You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This tool creates accessible trees in HTML.
It automatically adds
aria-role="treeitem" to the relevant items.
To change the output of the tree, read the
Many, many examples are laid out in there.
You do not need to create a tuple if there are no children.
Install one (optional) package:
bs4 (Beautiful Soup 4), with
pip install -r requirements.txt.
This will make the output "pretty" (i.e. indented).
To print the output to terminal, run
To save to a file, run
python tree.py file.html.
To append to an already existing file, run
python tree.py >> file.html