This post originated from an RSS feed registered with Python Buzz
by Fabiano Weimar dos Santos.
Original Post: DCWorkflow dot graphs
Feed Title: [Xiru].org
Feed URL: http://xiru.org/blog/search_rss?path=/Xiru/blog
Feed Description: [Xiru].org - Fabiano Weimar dos Santos' Website. Usefull information about xiru's projects, Plone and Zope community and Python hacks.
Some days ago I talked with my friend Sidnei that pointed me a
interesting Debian package called graphviz. He used it to generate
documentation for a postgresql database model (using
postgresql-autodoc and graphviz). However, more than the packages,
what made me curious was the way how he did it; and It give an idea:
DCWorkflow graphs.
Graphviz has a program called dot. It receives a text file with a
digraph description and plot it using a math model to avoid cross
edges. So... I did a small spike to represent the standard Plone
workflow in a dot file. The source code is that:
After write that simple dot file, I used dot program to generate a
gif image. It's quite simple. See the example:
$ dot -Tgif plone.dot > plone.gif
If you want to download plone.dot file, click here.
Bingo! After that, I only need to write a Zope Product to read a
DCWorkflow definition and export a dot file. It's christmas and I want
to watch The Return of the King. I really don't want to develop
it today, but why not tomorrow?