Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for mscgen #167

Closed
oddhack opened this issue Sep 27, 2017 · 4 comments
Closed

Add support for mscgen #167

oddhack opened this issue Sep 27, 2017 · 4 comments
Milestone

Comments

@oddhack
Copy link

oddhack commented Sep 27, 2017

I have a bunch of MSC (Message Sequence Chart) files to include in my document, and the 'mscgen' converter installed which can turn them into SVG or other output formats. Would it be straightforward to plug a new input format into asciidoctor-diagram?

@pepijnve pepijnve changed the title Is it possible to add additional diagram types? Add support for mscgen Sep 28, 2017
@pepijnve
Copy link
Member

pepijnve commented Sep 28, 2017

Would it be straightforward to plug a new input format into asciidoctor-diagram?

Absolutely. Most of the code is shared between the various diagram types. The amount of CLI tool specific code is very small, so adding additional ones is straightforward.

First you need to create the block and block macro processors (see https://github.com/asciidoctor/asciidoctor-diagram/blob/master/lib/asciidoctor-diagram/shaape/extension.rb)
Then add a file for your new diagram type that registers the processors when it is required (see https://github.com/asciidoctor/asciidoctor-diagram/blob/master/lib/asciidoctor-diagram/shaape.rb)
Finally, require that file from asciidoctor-diagram.rb so that it is available when the main asciidoctor-diagram file is required (see https://github.com/asciidoctor/asciidoctor-diagram/blob/master/lib/asciidoctor-diagram.rb)

Is this something you would like to contribute or is this more a request to add support for mscgen? If you have some time to work on this available, I would be happy to merge a PR for this.

pepijnve added a commit that referenced this issue Sep 28, 2017
@pepijnve pepijnve added this to the 1.5.6 milestone Sep 28, 2017
@pepijnve
Copy link
Member

I had some free time this evening so I went ahead and integrated support for mscgen.

pepijnve added a commit to pepijnve/asciidoctor-diagram that referenced this issue Sep 28, 2017
@oddhack
Copy link
Author

oddhack commented Sep 28, 2017

Nice! Thanks very much - I will give it a try soon.

@vinipsmaker
Copy link
Contributor

Could the comment #167 (comment) be converted into a HACKING.adoc file and be included in the repo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants