mscgen_js - core package
Implementation of MscGen and two derived languages in JavaScript.
This is the JavaScript library that takes care of parsing and
rendering MscGen. You might be looking for one of these in stead:
Features
- Parses and renders MscGen
- Accepts all valid MscGen programs and render them correctly.
- All valid MscGen programs accepted by mscgen_js are also accepted and
rendered correctly by the original
mscgen
command. - If you find proof to the contrary: tell us.
- Parses and renders Xù
Xù is a strict superset of MscGen. It adds things like alt
and
loop
. - Parses and renders MsGenny
Same as Xù, but with a simpler syntax. - Translates between these three languages
- Spits out svg, GraphViz dot, doxygen and JSON.
- runs in all modern browsers (and in Node.js).
I'm still here. How can I use this?
You already know how to npm install mscgenjs
, right?
Good. For examples on how to use the mscgen_js core package, have a look at
the source code of any of the above mentioned tools.
Hint: for rendering graphics the library needs a DOMElement (with a
unique id) to perform its rendering in.
Building mscgen_js
See build.md.
How does mscgen_js work?
You can start reading about that over here
License
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.
Dependencies and their licenses
We built mscgen_js on various libraries, each of which have their own
license (incidentally all MIT style):
It uses 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
- Mike McTernan for creating the wonderful
MscGen language, the accompanying c implementation and for releasing both
to the public domain (the last one under a GPLv2 license
to be precise).
- David Majda for cooking and maintaining the fantastic
and lightning fast PEG.js parser generator.
- Elijah Insua for jsdom, which allows us to
test rendering vector graphics in Node.js without having to resort
to outlandish hacks.
Build status