3

Every Python developer knows tools like Sphinx. You write some text in a markup language, write make in the shell and let some compilers do their job. In the end you get beautiful HTML or PDF.

I am looking for something like that, just for Finite State Machines, e.g. I put SCXML into a file (with a GUI or manually with VIM as I desire) start a compiler and out comes a picture file format that i can use however I please and that looks good even if I don't know what I am doing. Example:

$ vim my-fsm.scxml
$ scxml2svg my-fsm.scxml
writing file...
finished writing my-fsm.svg
$

The closest I got so far is using various Eclipse plugins (years ago, dislike huge IDEs), draw.io or what I am using now: Umlet. Even Umlet has problems, though. For example it doesn't support the workflow I am used to (write text files, start compiler, see beautiful result). The results are often also suboptimal, because the engine is actually quite simple. But everywhere I look for a more useful alternative (python wiki, other SO questions, tools) I still don't find a simple compiler.

Now I would be really happy if anybody would know such a compiler. If not possible a FOSS GUI editors with PNG/SVG export would also be okay.

Community
  • 1
  • 1
erikbstack
  • 12,878
  • 21
  • 81
  • 115
  • like Ragel (http://www.complang.org/ragel/) but using SCXML as input data ? – lucasg Sep 05 '13 at 14:09
  • Ah other input data is also fine. just fsm-source-to-image compiling is important. Ragel looks quite good. Do you know more like that? Also feel free to add that as a complete answer and edit the question to match! – erikbstack Sep 05 '13 at 14:10

2 Answers2

1

GraphViz has a file format which can be written manually and compiled to different picture formats.

erikbstack
  • 12,878
  • 21
  • 81
  • 115
1

I wrote some tools to do this: http://goo.gl/V97ft

jbeard4
  • 12,664
  • 4
  • 57
  • 67
  • yes, great! For my thesis I am set to plantuml currently, but your tooling makes more sense in the long run. Maybe you can offer shell support in some way? – erikbstack Nov 24 '13 at 13:59
  • 1
    Should be possible with PhantomJS. I'll look into it. – jbeard4 Nov 25 '13 at 16:53
  • 1
    I added command-line PDF generation capability to scxml-viz. Give it a try and let me know if you have any trouble with it: https://github.com/jbeard4/scxml-viz – jbeard4 Nov 27 '13 at 23:15