GithubHelp home page GithubHelp logo

sc0ttbeardsley / mscgen_js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sverweij/mscgen_js

0.0 2.0 0.0 11.42 MB

turns text into sequence charts

Home Page: https://sverweij.github.io/mscgen_js

License: GNU General Public License v3.0

Makefile 5.25% JavaScript 66.35% HTML 23.51% CSS 4.44% Shell 0.46%

mscgen_js's Introduction

mscgen_js

Turns text into sequence charts.

Build Status Code Climate test coverage (codecov.io) Dependency Status devDependency Status mscgen.js.org

Sample

This sequence chart ...

a sample sequence chart, rendered as png

was made with this MscGen source:

    msc {
      a [ label="Entity A", textbgcolor="red", textcolor="white" ],
      b [ label="Entity B", textbgcolor="yellow" ],
      c [ label="Entity C", textbgcolor="blue", textcolor="yellow" ];

      a->b [ label = "ab()" ] ;
      b->c [ label = "bc(TRUE)"];
      c=>>c [ label = "process(1)" ];
      b<<=c [ label = "callback()", arcskip="1"];
      |||;
      ---  [ label = "If more to run", ID="*" ];
      a->a [ label = "next()"];
      a=>c [ label = "ac1()"];
      b<<c [ label = "cb(true)", textbgcolor="lime"];
      b->b [ label = "stalled(...)"];
      a<<b [ label = "ab() = FALSE", textcolor="red", linecolor="red"],
      c note c [ label="Just a note ...", linecolor="green",
                textcolor="green", textbgcolor="lime" ];
    }

(Open this chart in the online interpreter)

mscgen_js and the MscGen standard

mscgen_js was made to go both ways:

  • Accept all valid MscGen programs and render them correctly.
  • Have all valid MscGen programs accepted by mscgen_js accepted and rendered correctly by MscGen.

Moreover MsGenny, the simplified subset, translates to MscGen with the flip of a switch.

If you find proof to the contrary on any of this tell us.

Building mscgen_js yourself

See build.md. If you want to understand how mscgen_js' innards work: we try to explain that in the script folder.

More mscgen_js

  • Embedding MscGen in HTML: mscgenjs-inpage

    • Tight, standalone front end library that renders MscGen (and the two derivative languages) within any HTML. As used in the tutorial and the embedding guide.
    • npm install mscgenjs-inpage
    • (This replaces the provisional bower package with the same purpose).
  • Command line interface: mscgenjs-cli

    • Option syntax is similar to the original mscgen, so in theory you could use it as a drop-in replacement for that.
    • npm install mscgenjs-cli
  • MscGen package for the atom editor

    • Has real-time rendering, W00t syntax highlighting, svg & png export and some other cool stuff. Check it out on github or on atom.io.
    • Installing: directly from within Atom or with the atom package manager (apm install mscgen-preview).
  • mscgenjs-core

    • Library package. Contains the parsing and rendering logic for all mscgenjs.
    • npm install mscgenjs

License information

This software is free software licensed under GPLv3. This means (a.o.) you can use it as part of other free software, but not as part of non free software. We have a slight relaxation for when you'd want to use mscgen-inpage.js.

Commercial use of embedding mscgen using mscgen-inpage.js

In addition to the GNU public license, for the use of the minified version of the embedding code (mscgen-inpage.js) as described on embedding a special exception to the GPL is made:

As a special exception to the GPL, any HTML file which merely makes function calls to mscgen-inpage.js, and for that purpose includes it by reference shall be deemed a separate work for copyright law purposes. In addition, the copyright holders of this code give you permission to combine this code with free software libraries that are released under the GNU LGPL. You may copy and distribute such a system following the terms of the GNU GPL for this code and the LGPL for the libraries. If you modify this code, you may extend this exception to your version of the code, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.

Dependencies and their licenses

mscgen_js is built on various libraries, each of which have their own license (incidentally all MIT style):

Icons courtesy of Dmitry Baranovskiy license.

  • Icons in the animation, were created with the IcoMoon App. At the time the font was created it was licensedGPLv3 or CC BY 4.0

It uses mocha, chai, istanbul, jshint, plato and nsp to maintain some modicum of verifiable code quality. You can see the build history in Travis and an indication of the shape of the code at Code Climate .

Thanks

mscgen_js's People

Contributors

sverweij avatar

Watchers

 avatar  avatar

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.