Skip to content

Latest commit

 

History

History
97 lines (80 loc) · 3.52 KB

README.md

File metadata and controls

97 lines (80 loc) · 3.52 KB

grapho

Build Status

A copycat of gravizo.com by Go

Only support Graphviz and Plant UML now.

Graphviz Diagram

<img src='http://g.gongshw.com/g?
 digraph G {
   main -> parse -> execute;
   main -> init;
   main -> cleanup;
   execute -> make_string;
   execute -> printf
   init -> make_string;
   main -> printf;
 }
'>

Plant UML Class Diagram

<img src='http://g.gongshw.com/g?
@startuml;
class Object << general >>;
Object <|--- ArrayList;
note top of Object : In java, every class\nextends this one.;
note "This is a floating note" as N1;
note "This note is connected\nto several objects." as N2;
Object .. N2;
N2 .. ArrayList;
class Foo;
note left: On last defined class;
@enduml;
'>

Plant UML Sequnce Diagram

<img src='http://g.gongshw.com/g?
@startuml;
Alice -> Bob: Authentication Request;
alt successful case;
    Bob -> Alice: Authentication Accepted;
else some kind of failure;
    Bob -> Alice: Authentication Failure;
    group My own label;
    	Alice -> Log : Log attack start;
        loop 1000 times;
            Alice -> Bob: DNS Attack;
        end;
    	Alice -> Log : Log attack end;
    end;
else Another type of failure;
   Bob -> Alice: Please repeat;
end;
@enduml;
'>

Plant UML Use Case Diagram

<img src='http://g.gongshw.com/g?
@startuml;
:Main Admin: as Admin;
(Use the application) as (Use);
User -> (Start);
User --> (Use);
Admin ---> (Use);
note right of Admin : This is an example.;
note right of (Use);
  A note can also;
  be on several lines;
end note;
note "This note is connected\nto several objects." as N2;
(Start) .. N2;
N2 .. (Use);
@enduml;
'>