weidagang / text-diagram Goto Github PK
View Code? Open in Web Editor NEWText Diagram is a web tool for drawing UML sequence diagram in pure text.
Home Page: http://weidagang.github.com/text-diagram
Text Diagram is a web tool for drawing UML sequence diagram in pure text.
Home Page: http://weidagang.github.com/text-diagram
TextDiagam is a web tool for drawing UML sequence diagram in pure text. http://weidagang.github.com/text-diagram Input: object April Todd Monad April->April: Prepare food for lunch. space 5 note left of April: Lunch is ready. April->Todd: Todd, what are you doing? note right of Todd: @_@ Todd->April: Well...\nI'm programming. space 5 April->Monad: How about you? Monad->April: I'm reading book. April->Monad: Good boy! note right of Monad: ^_^ Output: +-------+ +-------+ +-------+ | April | | Todd | | Monad | +-------+ +-------+ +-------+ | | | | Prepare food for lunch. | | |------------------------ | | | | | | |<----------------------- | | | | | | | | | | | | | | | | | ------------------\ | | | | Lunch is ready. |-| | | |-----------------| | | | | | | | Todd, what are you doing? | | |------------------------------>| | | | ------\ | | |-| @_@ | | | | |-----| | | | | | Well... | | | I'm programming. | | |<------------------------------| | | | | | | | | | | | | | | | | | | | | How about you? | | |------------------------------------------>| | | | | I'm reading book. | |<------------------------------------------| | | | | Good boy! | | |------------------------------------------>| | | | ------\ | | |-| ^_^ | | | | |-----| | | |
Looking the grammar at https://github.com/weidagang/text-diagram/blob/master/text-diagram/text-diagram.js and manually converting/simplifying it to an EBNFunderstood by https://www.bottlecaps.de/rr/ui we can get a nice railriad diagram (https://en.wikipedia.org/wiki/Syntax_diagram).
Copy the EBNF shown bellow on https://www.bottlecaps.de/rr/ui at the tab "Edit Grammar" then switch to the tab "View Diagram".
program ::= statement*
statement ::= object_declaration | message_statement | note_statement | space_statement
object_declaration ::= "object" object_id EOS
message_statement ::= object_id "->" object_id content? EOS
note_statement ::= side "of" object_id content EOS
space_statement ::= size
object_id ::= ([a-z]|[A-Z]|[0-9]|_)+
content ::= ":" text
size ::= [0-9]+ //integer
EOS ::= ';' | '\n' | EOF
Does this tool give a way to depict multiple threads? If not, how difficult would it be to add this?
I find this tool very useful but as a hardcore programmer my real happiness lies at a terminal rather than a web browser. Can a CLI wrapper be provided?
I think this is a feature request for CJK characters (twice size of Latin letters) display right.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.