https://github.com/lucemans/whatthedot
https://github.com/lucemans/whatthedot
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/lucemans/whatthedot
- Owner: lucemans
- Created: 2020-10-22T01:12:06.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-12-10T21:39:13.000Z (over 5 years ago)
- Last Synced: 2025-03-21T06:46:35.150Z (over 1 year ago)
- Language: TypeScript
- Size: 67.4 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WhAtThEdOt
A simple library for building dot (graphviz) files with javascript and typescript
# Aim
My primary aim for this project is to build something fun while learning DOT on the way.
And ofc just have fun with dot
# Examples
Below are some examples of fun stuff you can do with dot
## Ur average dot file
### Code
```dot
digraph figureName {
name -> thing;
thing -> name;
}
```
### Output:

## Example from the documentation
### Code
```dot
digraph G {
main -> parse -> execute;
main -> init;
main -> cleanup;
execute -> make_string;
execute -> printf;
init -> make_string;
main -> printf;
execute -> compare;
}
```
### Output:

# Export / Convert
Exporting can be done to `pdf` file format through the following command.
```shell
$ dot -Tpdf foo.dot -o foo.pdf
```
# Extension
Allows you to open preview of your graph to the side
# Links
| Description | Link |
| --------- | ---- |
| The dot documentation | https://graphviz.org/pdf/dotguide.pdf |
| VSCode Extension | https://marketplace.visualstudio.com/items?itemName=joaompinto.vscode-graphviz |