开发者

How to alternative way (!pic2plot) to generate sequence diagrams from some declarative textual form?

There is pic2plot component from UMLGraph to draw sequence diagrams (sequence.pic).

Input format is like:

.PS
copy "/usr/local/lib/sequence.pic"; 

object(N0,"0"); 
object(N1,"1"); 

step();

message(N0,N0,"doSomething()"); 
message(N0,N1,"callFunction()");

step();

.PE

The main disadvantage is that it is based on pic2plot which looks abandoned, fails to handle UTF-8 and have hard-to-find 开发者_运维知识库documentation (even man plotutils does not have a full set of useful man pages).

Is there alternatives draw sequence diagrams from simple text-based input without GUI?

Note: Now using this hack:

cat mpiseq.pic | u8h | pic2plot -T svg | xml2 | perl -pe 's!/svg/\@height=8in!/svg/\@height=32in!; s!/svg/\@viewBox=0 0 1 1!/svg/\@viewBox=0 -0.2 1 3.8!' | 2xml | h8u | svg

u8h/h8u masks/unmasks UTF-8 characters as sequence of hex digits (protected by signatures)


In fact, there are several alternatives. Take a look at this list of textual UML tools


I've tried sdedit, which couldn't even process its own example!

Among the myriad of tools, plantuml stands out in my book: can handle pretty complex features with crisp clear syntax.

@startuml
Alice->Bob : hello
note left: this is a first note

Bob->Alice : ok
note right: this is another note

Bob->Bob : I am thinking
note left
    a note
    can also be defined
    on several lines
end note
@enduml
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜