If you use the tool, and like it, don't forget to add a star to the project on GitHub :star:, it helps us to keep motivation to improve it.
If you have any suggestion, or issue, please report it, it will help us to fix them.
To download the tool
bash
docker pull nag763/doteur:latest
Then to use it, simply pass a folder with your sql files, and be careful to write all your outputs in the shared folder to ensure the files are available on your host machine once the image is destroyed.
bash
docker run --rm -v ${PATH_TO_YOUR_SQL_FOLDER}:/usr/src/doteur/shared -it nag763/doteur:latest bash
First install graphviz.
On Linux, use your default package manager.
Example on ubuntu :
usr@ubuntu:~$ sudo apt-get install graphviz
On Windows, use winget or the default graphviz installer.
You can still refer to the graphviz download page.
The tool uses graphviz libraries to render in other formats than .dot, if graphviz is not installed or you do not want to install it, you can still use this tool and pass it your output file.
cargo install doteur
Via the release page
Via the official website
Via github
bash
cargo install --git https://github.com/nag763/doteur
bash
doteur --help
If you need to use it regularly, it is recommended to add the bin folder to your path. For this, look on how to do it on your distro.
On linux :
bash
ln -s path/to/doteur /usr/sbin
```bash doteur 0.4.0 LABEYE Loïc loic.labeye@pm.me Convert .sql files to .dot files, render them if graphviz installed
USAGE: doteur [FLAGS] [OPTIONS] ...
FLAGS: --dark-mode Render in dark mode -h, --help Prints help information --legend Includes hint about the relations type at the bottom of the outpout file -V, --version Prints version information
OPTIONS:
-x, --exclude
ARGS: ... Name of the sql file, can also be a directory or several files ```
bash
usr@pop-os:~$ doteur sample.sql
The output will be in the output.dot
bash
usr@pop-os:~$ doteur sample.sql -o output.png
The output will be in a png file.
For the format supported, please refer to the graphviz documentation
bash
usr@pop-os:~$ doteur sample.sql -o output.png --dark-mode
bash
usr@pop-os:~$ doteur sample.sql -o output.png -i hello world
bash
usr@pop-os:~$ doteur sample.sql -o output.png -i hello*
bash
usr@pop-os:~$ doteur sample.sql -o output.png -x hello*
bash
usr@pop-os:~$ RUST_LOG=ERROR doteur sample.sql
With available levels being DEBUG
, INFO
, WARN
, ERROR