seamia / protodot Goto Github PK
View Code? Open in Web Editor NEWtransforming your .proto files into .dot files (and .svg, .png if you happen to have graphviz installed)
License: BSD 3-Clause "New" or "Revised" License
transforming your .proto files into .dot files (and .svg, .png if you happen to have graphviz installed)
License: BSD 3-Clause "New" or "Revised" License
I just downloaded the program and created a basic config file. I also installed Graphviz. Following are the details:
Command:
protodot.exe -src protoFileName.proto
config.json:
{
"locations": {
"graphviz": "C:\\Program Files\\Graphviz 2.44.1\\bin"
},
"options": {
"generate .png file": true,
"generate .svg file": false,
}
}
Error message:
Assert: *** Failed to process file json data, error: invalid character '}' looking for beginning of object key string
Error: failed to load config file
This project is really awesome, but I'd like to change the colors to something a bit easier to read. In config.json there are a bunch of colors listed, but I have no idea where the listed colors come from or how to specify new colors by hex value. I tried "#8888ff" and "8888ff", but neither way worked. Any documentation or advice would be appreciated. Thanks!
It looks like https://camo.githubusercontent.com/ is gone, so all the image links are broken. However, the images could be served from the repo itself.
https://protodot.seamia.net/ is down, when I tried to download this "looking some awesome" project. Can you bring it up?
Is there a way to get consistent (or nearly consistent) comparable output?
My specific use case is that we have protobufs, and expect to have the graph files checked into the repo as part of the commit. The simplest way to do this (we do it for generated language bindings) is to run protodot
, and check if the file is different from what is checked in.
Except the output isn't consistent.
From my checks, I found several things:
generated by
comment at the end; we can ignore thatsubgraph cluster_<id>
: the ID appears to be generated using some data about the content. As far as I can tell, this is consistentNode_Ja_<number>
: the numbers appear to be consistent with the content in themI don't know the internals of protodot
well enough, but it looks like consistent sorting of the subgraphs and nodes within subgraph might go a long way?
In a run I found this which was fixed once I downloaded the google apis and stored then in the includes list then it started working:
*** failed to find file [ google/api/annotations.proto ] with root [ /Users/...REMOVED... ]
*** failed to find file [ google/protobuf/struct.proto ] with root [ /Users/...REMOVED... ]
*** failed to find file [ google/protobuf/any.proto ] with root [ /Users/...REMOVED... ]
ASSERT: Unresolved type: google.protobuf.Any ; source: our.own.Dependency
The default config.json includes does not work, the folder "${HOME}/protodot/protoc-3.6.0/include"
was not in that location, even not after running protodot -install
. The README.md
should be updated to give some instructions to put the base proto files there.
Built the executable from code on MacOS.
There should be a default path list for the config present, such as in config.hson
and if not found then protodot/config.json
, etc. Specifying it each time does not make sense.
After the last change/commit, we get an error message that it cannot find the template files.
Error msg for proto file 1:
failed to load templates file [templates/oneof_entry_suffix.tmpl] not found
Error msg for proto file 2:
failed to load templates file [templates/enum_suffix.tmpl] not found
Command used:
protodot -config ../protodot.json -inc /usr/include -src *.proto -select AnyService -output AnyService
I have a repository of protobuf files that use some basic types from another repo which is not available at the time when I am generating graphs. StringUtf8Value, BoolValue, ResourceName, that kind of thing. I really don't need them graphed.
I would like to exclude the diagramming of missing nodes as it clutters the output just pointing to a Node that says "this type is missing"
Thanks for your consideration, I love this tool it really helps to map things out in my mind.
Hello, I tried with -output option with "home/put/it/here/target", but I got an error.
How to do this? Thanks!
Hi!
It would be super-useful for me if comments I leave above fields in protobuf will carry over to the .dot (and .svg) file. Any way to make this happen? Would love to help with guidance
Great tool, I really like it.
The only thing missing I think is to overwrite the output directory from command line.
I am a developer myself, but I have zero experience with GO, or else I would simply put in a pull request.
Regards, Reinhard.
Hi, many thanks for this superb project.
I feel that people might benefit from having the option to also include proto annotations in generated dot/svg files.
I would like to work on that and contribute back, but I am not a Go programmer and finding it a challenge to unravel where to start inspecting the code to add the same functionality.
Is it possible for you to point me to where the functionality for adding name/datatype of the field lives in the code base, so I can start experimenting?
So much better if a feature like this is already in the works.
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.