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

Run as non-http utility (eg output SVG, PNG to a file w/o opening a web server) #36

Closed
Russtopia opened this issue Nov 21, 2018 · 1 comment

Comments

@Russtopia
Copy link
Contributor

Russtopia commented Nov 21, 2018

USE CASE: calling go-callvis from a Makefile to non-interactively generate an output image of dot visualization

The examples page shows usage such as

go-callvis <opts> | dot -Tpng -o output.png

However this calling style still seems to launch the web browser with output rather than just outputting a dot PNG file, making it unsuitable for use in scripts or makefiles. Piping to 'dot' util as in the examples appears not to work as go-callvis doesn't output suitable data to stdout.

EDIT: I see that while the program is running, the output is written to /tmp/go-callvis_export.svg. Basically it would be good if this were specifiable via a new option like '-output' to give a custom path, and if -skipbrowser or the presence of -output would prevent launching the web browser and have go-callvis exit after generating the SVG.

I'll work on a patch to do this and submit a pull request.

@Russtopia Russtopia changed the title No way to just output PNG w/o opening web server (scripted use) Run as non-http utility (eg output SVG, PNG to a file w/o opening a web server) Nov 23, 2018
@Russtopia
Copy link
Contributor Author

I have submitted pull request #39 which implements this feature.

Very useful tool thank you!

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

No branches or pull requests

2 participants