Network Pipe Manufacturer
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    shakypublic

    shaky

    Shaky is a awesome shaky box-and-lines ASCII art diagramming tool. You can generate the diagram from ASCII. All code are compiled from coffee script which port from moe-js.

    Dependencies

    Because shaky uses node-canvas to draw the diagram, we need to install some dependencies for node-canvas. This page introduces many installations in different system. You can follow these manuals and start to install!

    Install

    npm install -g shaky
    

    Usage

    shaky -i ascii.txt -o diagram.png
    

    Notice: The program only supports the png file extension.

    If you want to write ascii.txt file, the following content will be a good example.

           +------------+     +------------+
           |            |     |            |
           |  CONTEXT   |<-+  |  CONTEXT   |<-+
           |            |  |  |            |  |
           +------------+  |  +------------+  |
                           |                  |
           +------------+  |  +------------+  |
           |    getY    |  |  |    getY    |  |
           |            |  |  |            |  |
           |     *------+--+  |     *------+--+
           |            |  |  |            |  |
           +------------+  |  +------------+  |
                           |                  |
           +------------+  |  +------------+  |
           |    getX    |  |  |    getX    |  |
           |            |  |  |            |  |
           |     *------+--+  |     *------+--+
           |            |  |  |            |  |
           +------------+  |  +------------+  |
                           |                  |
           +------------+  |  +------------+  |
           |   getSum   |  |  |   getSum   |  |
           |            |  |  |            |  |
           |     *------+--+  |     *------+--+
           |     *      |     |     *      |
           +-----+------+     +-----+------+
                 |                  |
                 +----------+-------+
                            |
                            v
                 +--------------------+
                 |  SharedFunctionInfo|
                 |          *         |
                 +----------+---------+
                            |
                            v
                 +--------------------+
                 |  unoptimized Code  |
                 |                    |
          ??? <--+---* getX call      |
                 |                    |
          ??? <--+---* getY call      |
                 |                    |
                 +--------------------+
        

    This is the output.

    Output

    install

    npm i shaky

    Downloadslast 7 days

    2

    version

    0.15.0

    license

    Apache-2.0

    repository

    github.com

    last publish

    collaborators

    • avatar