Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

text => sequence charts

License

NotificationsYou must be signed in to change notification settings

sverweij/mscgen_js

Turns text into sequence charts.

Build Statusmscgen.js.org

Sample

This sequence chart ...

a sample sequence chart, rendered as png

was made with thisMscGen 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", ];      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 validMscGen programs and render them correctly.
  • Have all valid MscGen programs accepted by mscgen_js accepted and renderedcorrectly by MscGen.

MoreoverMsGenny, the simplified subset, translatesto MscGen with the flip of a switch.

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

Building mscgen_js yourself

Seebuild.md. If you want to understand how mscgen_js'innards work: we try to explain thatin the script folder.

More mscgen_js

  • Embedding MscGen in HTML:mscgenjs-inpage

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

    • Option syntax is similar to the originalmscgen, soin 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 exportand some other cool stuff. Check it out ongithubor onatom.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 softwarelicensed under GPLv3.This means (a.o.) youcan use it as part of other free software, butnot as part of non free software. We have a slight relaxation for whenyou'd want to usemscgen-inpage.js.

Commercial use of embedding mscgen using mscgen-inpage.js

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

As a special exception to the GPL, any HTML file which merely makesfunction calls to mscgen-inpage.js, and for that purpose includesit by reference shall be deemed a separate work for copyright lawpurposes. In addition, the copyright holders of this code give youpermission to combine this code with free software libraries thatare released under the GNU LGPL. You may copy and distribute sucha system following the terms of the GNU GPL for this code and theLGPL for the libraries. If you modify this code, you may extendthis exception to your version of the code, but you are not obligatedto do so. If you do not wish to do so, delete this exception statementfrom your version.

Dependencies and their licenses

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

Icons are courtesy of Dmitry Baranovskiylicense.

It usesmocha,chai,istanbul,eslint and [dependency-cruiser][41] tomaintain some modicum of verifiable code quality.You can see the build history inGitHub actions.

Thanks

About

text => sequence charts

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Contributors3

  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp