-
-
Notifications
You must be signed in to change notification settings - Fork 415
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 options -format,-file for PNG/SVG file output #39
Conversation
Intended to address issue #36 |
Thank you for your contribution. Please fix the PR as mentioned in comments. |
@Russtopia It would be really great if you could also update few examples that show command usage with parameters, because they don't currently show something that would work with latest version. |
Sure, I should have done that with the original patch. |
Newest PR updates examples, but I had to guess at the last example -- I'm unfamiliar with 'exo-open' but from the context it appears to take the SVG output and convert to JPG? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the output format should not be checked for validity and we should let the dot program itself fail and report unsupported format error. We don't want to limit the output formats to only two options if there are many more formats supported by dot.
New version pushed. Implements the changes suggested:
|
} else { | ||
img = fmt.Sprintf("%s.%s", outfname, format) | ||
} | ||
cmd := exec.Command(dotExe, fmt.Sprintf("-T%s", format), "-o", img) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
format arg now passed directly to dotExe
Addition of -output, -svg, -png options to run go-callvis in a non-server mode to just output image files.
Useful for scripting eg., makefile targets to generate graphvis for modules non-interactively.