Git Product home page Git Product logo

adia's People

Contributors

pylover avatar saeedou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

adia's Issues

Sequence diagram break not working

diagram: Authentication
version: 1.0
author: pylover

sequence: Foo
foo -> bar

sequence: Bar
bar -> baz
 DIAGRAM: Authentication 
 author: pylover         
 version: 1.0            
                         
 SEQUENCE: Bar           
                         
 +-----+ +-----+ +-----+ 
 | foo | | bar | | baz | 
 +-----+ +-----+ +-----+ 
    |       |       |    
    |~~~~~~>|       |    
    |       |       |    
    |<------|       |    
    |       |       |    
    |       |~~~~~~>|    
    |       |       |    
    |       |<------|    
    |       |       |    
 +-----+ +-----+ +-----+ 
 | foo | | bar | | baz | 
 +-----+ +-----+ +-----+ 
                         

Condition inside self-call

diagram: Authentication
version: 1.0
author: pylover

sequence: Login

alice -> bob: authenticate(email, password) -> token
  bob -> bob: db.ensure()
    if: not db.is_connected
      bob -> db: connect()
 DIAGRAM: Authentication                                             
 author: pylover                                                     
 version: 1.0                                                        
                                                                     
 SEQUENCE: Login                                                     
                                                                     
 +-------+                              +-----+              +-----+ 
 | alice |                              | bob |              | db  | 
 +-------+                              +-----+              +-----+ 
     |                                     |                    |    
     |~~~authenticate(email, password)~~~~>|                    |    
     |                                     |~~~db.ensure()~~~+  |    
     |                                     |                    |    
     |                                  **************************** 
     |                                  * if not db.is_connected   * 
     |                                  **************************** 
     |                                     |                    |    
     |                                     |~~~connect()~~~~~~~>|    
     |                                     |                    |    
     |                                     |<-------------------|    
     |                                     |                    |    
     |                                  **************************** 
     |                                  * end if                   * 
     |                                  **************************** 
     |                                     |                 |  |    
     |                                     |<----------------+  |    
     |<--token-----------------------------|                    |    
     |                                     |                    |    
 +-------+                              +-----+              +-----+ 
 | alice |                              | bob |              | db  | 
 +-------+                              +-----+              +-----+ 
                                                                     

CONTRIBUTING.md

  • make env
  • make doc
  • make livedoc
  • make lint
  • make cover
  • make test
  • make serve
  • make clean
  • make cleanall
  • Client side tests

Unexpected syntax error

diagram: Foo
<space><space>  
# First section

Error

Syntax Error: BadSyntax: File "String", Interpreter: Diagram, line 3, col 0
Expected one of `# INDENT NEWLINE EOF NAME`, got: `DEDENT`.

Blank line at second or greater indentation level has unexpected behavior

diagram: Foo

sequence: Hello
foo -> bar
  bar -> baz

    baz -> qux

Output

DIAGRAM: Foo


SEQUENCE: Hello

+-----+ +-----+ +-----+ +-----+
| foo | | bar | | baz | | qux |
+-----+ +-----+ +-----+ +-----+
   |       |       |       |
   |~~~~~~>|       |       |
   |       |~~~~~~>|       |
   |       |       |       |
   |       |<------|       |
   |       |       |       |
   |       |       |~~~~~~>|
   |       |       |       |
   |       |       |<------|
   |<------|       |       |
   |       |       |       |
+-----+ +-----+ +-----+ +-----+
| foo | | bar | | baz | | qux |
+-----+ +-----+ +-----+ +-----+

ASCII Tables

| Days off | Reason               | Dates off  | Days remaining |
|----------+----------------------+------------+----------------|
|        1 | Door installed       | 10 January |             27 |
|      0.5 | Garage tidy          | 28 January |           26.5 |
|        1 | Bank, garage, Hagino | 8 February |           25.5 |

Fork diagram

  • Example of Git branching
  • Example of Unix fork

   test             pcap         main            httpd
    .                .            .               .
    .                .            .               .
  START              .            .               .
    |                .            .               .
    |________________             .               .
                     |            .               .
                    fork          .               .
     ________________|\___________                .
    |                             |               .
   test                           |               .
    |                             |               .
   stop                          fork             .
    |________________             |\______________ 
                     |            |               |
                    kill ------> kill ---------> loop 
                     |            | ______________|    
                    wait          |/                   
                     |           join
                     | ___________|
                     |/
                    join
     ________________|
    |
   EXIT

Self-call inside condition

diagram: Authentication
version: 1.0
author: pylover

sequence: Login

bob -> db: ensure()
  if: not db.is_connected
    db -> db: connect()
 DIAGRAM: Authentication                                                  
 author: pylover                                                          
 version: 1.0                                                             
                                                                          
 SEQUENCE: Login                                                          
                                                                          
 +-----+                            +-----+                               
 | bob |                            | db  |                               
 +-----+                            +-----+                               
    |                                  |                                  
    |~~~ensure()~~~~~~~~~~~~~~~~~~~~~~>|                                  
    |                                  |                                  
    |                               *******                               
    |                               * if not db.is_connected              
    |                               *******                               
    |                                  |                                  
    |                                  |~~~connect()~~~+                  
    |                                  |               |                  
    |                                  |<--------------+                  
    |                                  |                                  
    |                               *******                               
    |                               * end if                              
    |                               *******                               
    |                                  |                                  
    |<---------------------------------|                                  
    |                                  |                                  
 +-----+                            +-----+                               
 | bob |                            | db  |                               
 +-----+                            +-----+                               
                                                                          

Class diagram

                           +---------------+           +------------------+
                           | struct peer   |   +------>| enum peer_state  |
                           +---------------+   |       +------------------+
                           | +fd           |   |       |  PS_READ         |
                           |  state        >---+       |  PS_WRITE        |
                           |  writebuff[]  |           +------------------+
                           |  writerb      |
                           | *handler      |           +------------------+
                           +---------------+       +-->| struct ev_epoll  |
                                                   |   +------------------+
  +-----------------+      +---------------+       |   |  epollfd         |
  | struct ev       |  +-->| union ev_priv |       |   +------------------+
  +-----------------+  |   +---------------+       |
  |  id             |  |   |  ev_epoll     >-------+   +------------------+
  |  forks          |  |   |  ev_select    >---------->| struct ev_select |
  |  children[]     |  |   |  ev_mock      >-------+   +------------------+
  |  private_data   >--+   +---------------+       |   | ?                |
  +-----------------+                              |   +----------------- +
  | *on_recvd       |                              |
  | *on_writefinish |                              |   +------------------+
  +-----------------+                              +-->| struct ev_mock   |
      ^         ^                                      +------------------+
      |         |                                      | ?                |
      |         +--------------+                       +------------------+
      |                        |
  +---^-----------+        +---^------------+
  | struct ev_srv |        | struct ev_clnt |
  +---------------+        +----------------+
  | +struct ev    |        | +struct ev     |
  |  listenfd     |        |  hostname      |
  |  bind         |        |  port          |
  +---------------+        +----------------+
  | *on_connect   |        |  ?             |
  +---------------+        +----------------+

Extra right padding due @note

diagram: Authentication
version: 1.0
author: pylover

sequence: Login
alice.title: Alice
bob.title: Bob
db.title: Database

@alice ~ bob: Alice tries to authenticate herself
alice -> bob: authenticate(email, password) -> token
  if: not db.is_connected
    bob -> db: connect()
  
  for: each oldtoken in db
    bob -> db: delete(oldtoken)
   
@alice: |
  Alice decides to 
  store the newly 
  received Token 
  in a safe place. 
alice -> alice: store(token)
 DIAGRAM: Authentication                                                         
 author: pylover                                                                 
 version: 1.0                                                                    
                                                                                 
 SEQUENCE: Login                                                                 
                                                                                 
 +-------+                                   +-----+               +-----------+ 
 | Alice |                                   | Bob |               | Database  | 
 +-------+                                   +-----+               +-----------+ 
     |                                          |                        |       
 ---------------------------------------------------                     |       
 | Alice tries to authenticate herself             |                     |       
 ---------------------------------------------------                     |       
     |                                          |                        |       
     |~~~authenticate(email, password)~~~~~~~~~>|                        |       
     |                                          |                        |       
     |                                       *********************************** 
     |                                       * if not db.is_connected          * 
     |                                       *********************************** 
     |                                          |                        |       
     |                                          |~~~connect()~~~~~~~~~~~>|       
     |                                          |                        |       
     |                                          |<-----------------------|       
     |                                          |                        |       
     |                                       *********************************** 
     |                                       * end if                          * 
     |                                       *********************************** 
     |                                          |                        |       
     |                                       *********************************** 
     |                                       * for each oldtoken in db         * 
     |                                       *********************************** 
     |                                          |                        |       
     |                                          |~~~delete(oldtoken)~~~~>|       
     |                                          |                        |       
     |                                          |<-----------------------|       
     |                                          |                        |       
     |                                       *********************************** 
     |                                       * end for                         * 
     |                                       *********************************** 
     |                                          |                        |       
     |<--token----------------------------------|                        |       
     |                                          |                        |       
 ---------------------                          |                        |       
 | Alice decides to  |                          |                        |       
 | store the newly   |                          |                        |       
 | received Token    |                          |                        |       
 | in a safe place.  |                          |                        |       
 ---------------------                          |                        |       
     |                                          |                        |       
     |~~~store(token)~~~+                       |                        |       
     |                  |                       |                        |       
     |<-----------------+                       |                        |       
     |                                          |                        |       
 +-------+                                   +-----+               +-----------+ 
 | Alice |                                   | Bob |               | Database  | 
 +-------+                                   +-----+               +-----------+ 
                                                                                 

While loop rendering problem


diagram: ADia Web Wroker
author: Vahid Mardani

sequence:
a.title: adia.js
w.title: adia_worker.py
while: worker is not initialized
  a -> a: Wait()
DIAGRAM: ADia Web Wroker
author: Vahid Mardani

+---------+                        +-----------------+
| adia.js |                        | adia_worker.py  |
+---------+                        +-----------------+
     |                                      |
********************************            |
* while worker is not initialized           |
********************************            |
     |                                      |
     |~~~Wait()~~~+                         |
     |            |                         |
     |<-----------+                         |
     |                                      |
********************************            |
* end while                    *            |
********************************            |
     |                                      |
+---------+                        +-----------------+
| adia.js |                        | adia_worker.py  |
+---------+                        +-----------------+

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.