Popular recipes tagged "graphviz"http://code.activestate.com/recipes/tags/graphviz/2012-07-05T17:01:53-07:00ActiveState Code RecipesDisplay a git repository (Ruby)
2012-07-05T17:01:53-07:00Noufal Ibrahimhttp://code.activestate.com/recipes/users/4173873/http://code.activestate.com/recipes/577572-display-a-git-repository/
<p style="color: grey">
Ruby
recipe 577572
by <a href="/recipes/users/4173873/">Noufal Ibrahim</a>
(<a href="/recipes/tags/git/">git</a>, <a href="/recipes/tags/graphviz/">graphviz</a>, <a href="/recipes/tags/grit/">grit</a>, <a href="/recipes/tags/visualisation/">visualisation</a>).
Revision 2.
</p>
<p>A tiny script to display the entire contents of a medium sized git repository. It will display tags, branches and commits with different shapes and colours and the commits messages in a dimmed colour. </p>
<p>It relies on graphviz to do the plotting.
Use it like so </p>
<pre class="prettyprint"><code> ruby plotrepo.rb /path/to/repository | dot -Tpng | display -antialias
</code></pre>
Plot database table dependecies for a mySQL database (Python)
2010-07-10T08:14:09-07:00Noufal Ibrahimhttp://code.activestate.com/recipes/users/4173873/http://code.activestate.com/recipes/577298-plot-database-table-dependecies-for-a-mysql-databa/
<p style="color: grey">
Python
recipe 577298
by <a href="/recipes/users/4173873/">Noufal Ibrahim</a>
(<a href="/recipes/tags/database/">database</a>, <a href="/recipes/tags/dot/">dot</a>, <a href="/recipes/tags/graphs/">graphs</a>, <a href="/recipes/tags/graphviz/">graphviz</a>, <a href="/recipes/tags/mysql/">mysql</a>).
</p>
<p>The following snippet will output a spec suitable for the graphviz dot program. It will go through the database specified and for all the tables that start with any of the names in <code>table_prefixes</code>, it will create a dependency graph. A dependency in this context is when a field of one table has a foreign key reference to another. The edges are labelled with the actual field names. </p>
<p>It can be used like this</p>
<pre class="prettyprint"><code>python deps.py | dot -Tpng | display
</code></pre>
<p>This requires the InnoDB engine (i.e. something that honours foreign keys. MyISAM doesn't do so).</p>