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

[PROPOSED] Replace mscgen with mscgenjs-cli #404

Closed
barthel opened this issue Mar 21, 2023 · 2 comments
Closed

[PROPOSED] Replace mscgen with mscgenjs-cli #404

barthel opened this issue Mar 21, 2023 · 2 comments

Comments

@barthel
Copy link

barthel commented Mar 21, 2023

As part of asciidoctor/docker-asciidoctor#51 I have been trying to create a multi-platform Asciidoctor Docker image.

In doing so,mscgen (https://www.mcternan.me.uk//mscgen/) was a challenge, as there is only one glibc platform or static linked variant and not suitable for Alpine on arm platforms.

To remove this limitation, I looked at mscgenjs-cli (https://github.com/mscgenjs/mscgenjs-cli) and included it.
Since it supports compatible (and more) CLI parameters, replacing the executable was enough.

To further promote platform independence, I would like to propose an official switch to or support of mscgenjs-cli.

mscgen:

Usage: mscgen -T <type> [-o <file>] [-i] <infile>
       mscgen -l

Where:
 -T <type>   Specifies the output file type, which maybe one of 'png', 'eps',
             'svg' or 'ismap'
 -i <infile> The file from which to read input.  If omitted or specified as
              '-', input will be read from stdin.  The '-i' flag maybe
              omitted if <infile> is specified as the last option on the
              command line.
 -o <file>   Write output to the named file.  This option must be specified if 
              input is taken from stdin, otherwise the output filename
              defaults to <infile>.<type>.  This may also be specified as '-'
              to write output directly to stdout.
 -p          Print parsed msc output (for parser debug).
 -l          Display program licence and exit.

Mscgen version 0.20, Copyright (C) 2010 Michael C McTernan,
                                        Michael.McTernan.2001@cs.bris.ac.uk
Mscgen comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are
welcome to redistribute it under certain conditions; type `mscgen -l' for
details.

PNG rendering by libgd, www.libgd.org

mscgenjs-cli:

Usage: mscgen_js [options] [infile]

Options:
  -T --output-type <type>          svg|png|jpeg|mscgen|msgenny|xu|json|ast|dot|doxygen
  -I --input-type <type>           mscgen|msgenny|xu|json|ast
  -i --input-from <file>           File to read from. use - for stdin.
  -o --output-to <file>            File to write to. use - for stdout.
  -p --parser-output               Print parsed msc output
  -s --css <string>                Additional styles to use. Experimental
  -n --named-style <style>         basic|lazy|classic|noentityboxes
  -m --mirror-entities             Repeat the entities on the chart's
                                   bottom
  -v --vertical-alignment <align>  Vertical alignment of labels on regular
                                   arcs. Experimental
                                   above|middle|below (default: "middle")
  --puppeteer-options <file>       (advanced) pass puppeteer launch options
                                   see README.md for details
  -l --license                     Display license and exit
  -V, --version                    output the version number
  -h, --help                       display help for command

@barthel
Copy link
Author

barthel commented Mar 21, 2023

WDYT? @pepijnve @mojavelinux

@barthel
Copy link
Author

barthel commented Mar 21, 2023

Used and testable via Docker Image https://hub.docker.com/r/uwebarthel/asciidoctor/

Github project (Dockerfile): https://github.com/barthel/docker-asciidoctor

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

2 participants