Skip to content

Instantly share code, notes, and snippets.

@messa
Last active November 15, 2017 09:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save messa/e3185d1c3cb3fa70ee3ce07f04b5b6b9 to your computer and use it in GitHub Desktop.
Save messa/e3185d1c3cb3fa70ee3ce07f04b5b6b9 to your computer and use it in GitHub Desktop.
Graphviz naučse demo
digraph g {
graph [
rankdir = "LR"
labeljust = "l"
]
node [
fontname = "inconsolata"
fontsize = 11
]
ai_py [
shape = none
label = <
<TABLE border="0" cellborder="1" cellspacing="0">
<TR><TD port="fn"><B>ai.py</B></TD></TR>
<TR><TD sides='lrb'>&nbsp;</TD></TR>
<TR><TD sides='lrb'>def tah_pocitace</TD></TR>
</TABLE>
>
]
piskvorky_py [
shape = none
label = <
<TABLE border="0" cellborder="1" cellspacing="0" align="left">
<TR><TD port="fn"><B>piskvorky.py</B></TD></TR>
<TR><TD port="fi" sides="lrb" align="left">import ai</TD></TR>
<TR><TD sides="lrb" align="left" balign="left">
def vyhodnot<BR/>
def tah<BR/>
def tah_hrace
</TD></TR>
</TABLE>
>
]
hra_py [
shape = none
label = <
<TABLE border="0" cellborder="1" cellspacing="0" align="left">
<TR><TD port="fn"><B>hra.py</B></TD></TR>
<TR><TD port="fi" sides="lrb" align="left">import piskvorky</TD></TR>
<TR><TD sides="lrb" align="left" balign="left">&nbsp;</TD></TR>
</TABLE>
>
]
test_piskvorky_py [
shape = none
label = <
<TABLE border="0" cellborder="1" cellspacing="0" align="left">
<TR><TD port="fn"><B>test_piskvorky.py</B></TD></TR>
<TR><TD port="fi" sides="lrb" align="left">import piskvorky</TD></TR>
<TR><TD sides="lrb" align="left" balign="left">def test_...</TD></TR>
</TABLE>
>
]
piskvorky_py:fi -> ai_py:fn;
hra_py:fi -> piskvorky_py:fn:nw;
test_piskvorky_py:fi -> piskvorky_py:fn;
}
importy.png: importy.dot
dot -Tpng importy.dot > importy.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment