Skip to content

Instantly share code, notes, and snippets.

@ynx0
Last active February 6, 2021 21:35
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 ynx0/19f73bc2d2a5bcca894ef077831fd12a to your computer and use it in GitHub Desktop.
Save ynx0/19f73bc2d2a5bcca894ef077831fd12a to your computer and use it in GitHub Desktop.
WIP graphviz description of a publish post
digraph PublishPost {
// uses the dot engine
graph [rankdir="LR"];
node [shape="record"];
subgraph cluster_0 {
// color=blue
// node [style=filled];
// todo https://stackoverflow.com/questions/1554635/graphviz-how-to-have-a-subgraph-be-left-to-right-when-main-graph-is-top-to-bot
label = "Post";
revcontainer [
label = "<f0> Revision Container| <f1> /1|"
];
revision2 [
label = "<f0> Revision 2| <f2> /177700025| <f3> Content\nTitle:'First Post, Revised'\n Body: 'This is my first post.'";
];
revision1 [
label = "<f0> Revision 1| <f2> /177700000| <f3> Content\nTitle:'First Post'\n Body: 'My first post'";
];
revcontainer -> revision1;
revcontainer -> revision2;
}
subgraph cluster_1 {
// style=filled;
// color=lightgrey;
// node[style=filled,color=lightgray];
label = "Comments";
comments [
label = "<f0> Comments Container| <f1> /2|";
];
// comment containers
comment3 [
label = "<f0> Comment 3 Container| /177709|";
];
comment2 [
label = "<f0> Comment 2 Container| /177708|";
];
comment1 [
label = "<f0> Comment 1 Container| /177707|";
];
// com1
com1rev1 [
label = "<f0> Revision 1| <f1> /1777074| <f2> Content\nComment: 'great article'";
];
// com2
com2rev1 [
label = "<f0> Revision 1| <f1> /17770758| <f2> Content\nComment: 'nice'";
];
// com3
com3rev3 [
label = "<f0> Revision 3| <f1> /17770779| <f2> Content\nComment: '[removed]'";
];
com3rev2 [
label = "<f0> Revision 2| <f1> /17770779| <f2> Content\nComment: 'edit: this sucks'";
];
com3rev1 [
label = "<f0> Revision 1| <f1> /17770779| <f2> Content\nComment: 'meh'";
];
comments -> comment1;
comments -> comment2;
comments -> comment3;
comment1 -> com1rev1;
comment2 -> com2rev1;
comment3 -> com3rev1;
comment3 -> com3rev2;
comment3 -> com3rev3;
}
root [
label= "<f0> Publish Post Root| <f1> /177000000000| <f2> ";
];
root -> revcontainer;
root -> comments;
}
@ynx0
Copy link
Author

ynx0 commented Feb 6, 2021

Screenshot from 2021-02-06 16-35-00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment