Skip to content

Dead-simple Python utility to convert array representations of trees (in the level-numbering [parent, left child, right child] format) into tree diagrams and an even simpler web interface to deliver them as SVGs or PNGs.

Notifications You must be signed in to change notification settings

toBeOfUse/svg-binary-tree-drawer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project runs on Python and depends on the Tornado and CairoSVG packages. The frontend is written in vanilla HTML and JavaScript.

The Python dependencies are managed by Pipenv; to prepare the environment, install Pipenv and Python 3.9 and run pipenv install in the root directory of the project. Then, execute pipenv run python server.py to start the server application, or substitute in the other Python files to run their minimal built-in tests.

This program attempts to render PNGs using the font Liberation Sans. If it is not installed on your system, CairoSVG will presumably fall back on some weird default, so watch out for that.

About

Dead-simple Python utility to convert array representations of trees (in the level-numbering [parent, left child, right child] format) into tree diagrams and an even simpler web interface to deliver them as SVGs or PNGs.

Topics

Resources

Stars

Watchers

Forks