part of the groupelephant.com family
beyond corporate purpose

Create UML diagrams from the command line

13 Oct 2009

Maybe you know it, maybe you don’t but yUML is awesome!

Create and share simple UML diagrams in your blogs, wikis, forums, bug-trackers and emails.

Yesterday I was creating a new class diagram using yUML and besides it’s a great product it was a bit cumbersome working in a small textarea and pressing ‘Generate!’ (all the time). I fired up textmate and created a diagram using the yUML syntax. A couple of minutes later I had ruby script which generated the diagram using yUML by taking a text file as input.

Thanks to Jeweler it’s dead easy to create gems and release them to Gemcutter so a yumlcmd gem was born.

###Installation###

sudo gem install yumlcmd

###Usage###

yumlme -f your-diagram.txt

###Example your-diagram.txt###

[Customer]+1->*[Order]
[Order]++1-items >*[LineItem]
[Order]-0..1>[PaymentMethod]

Syntax overview: http://yuml.me/diagram/scruffy/class/draw

###Output###

yuml-output.png

I hope you like it as much as I do :)

blog comments powered by Disqus