Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/notmatthancock/outline_to_dot
indented outline markup -> dot
https://github.com/notmatthancock/outline_to_dot
Last synced: 28 days ago
JSON representation
indented outline markup -> dot
- Host: GitHub
- URL: https://github.com/notmatthancock/outline_to_dot
- Owner: notmatthancock
- Created: 2015-07-06T02:16:06.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-07-08T03:13:25.000Z (over 9 years ago)
- Last Synced: 2024-08-01T15:10:09.409Z (3 months ago)
- Language: Python
- Homepage:
- Size: 169 KB
- Stars: 51
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Indented outline => dot
Convert a simple indented (markdown inspired) outline format to dot language.
Example input file:
# This is a comment; blank lines get eaten.
main
# Default indent marker is 4 spaces. This can be changed.
topic one
subtopic one
topic two
subtopic one
subtopic twoFrom the command line, running
./outline_to_dot.py input-file.txt
produces the output:
digraph G {
"main" -> "topic one";
"topic one" -> "subtopic one";
"main" -> "topic two";
"topic two" -> "subtopic one";
"topic two" -> "subtopic two";
}The default output is to standard out, but one can specify an output file with
./outline_to_dot.py -o output-file.dot input-filt.txt
So then
dot -Tpng -o output-graph.png output-file.dotproduces the following graph:
![](https://raw.githubusercontent.com/notmatthancock/outline_to_dot/master/example.png)
Another useful option is to maintain a strict tree structure in the output. This is specified as follows:
./outline_to_dot.py --tree=True input-file.txt
Using the same input as above, this produces a slightly different graph:
![](https://raw.githubusercontent.com/notmatthancock/outline_to_dot/master/example-tree-True.png)