Code Monkey home page Code Monkey logo

Comments (13)

bcronje avatar bcronje commented on August 23, 2024

I've used click-viz that uses click-pretty before:

# click-viz : a program to graphically visualize click scripts.
#
# The output of this program is meant to be piped to dot to
# generate a graph. Examples:
#	click-viz demo.click | dot -Tpng >demo.png
#       click-flatten demo.click | click-viz | dot -Tpng >demo.png

from fastclick.

bcronje avatar bcronje commented on August 23, 2024

I believe click-pretty can also export to html as well.

from fastclick.

tbarbette avatar tbarbette commented on August 23, 2024

With dot, the generated graph is horrible. is there a way to have the element style as in the Click paper?

from fastclick.

piotrjurkiewicz avatar piotrjurkiewicz commented on August 23, 2024

Graphs in the Click paper were generated using MetaPost. It works out of the box with modern LaTeX distributions (Miktex for example, command mptopdf xxx.mp), but diagrams cannot be generated automatically from Click configuration files. They must be written manually.

from fastclick.

cffs avatar cffs commented on August 23, 2024

Generating the graphs automatically for MetaPost (or TikZ, or ...) might be feasible, but we would need to come up with our own node placement algorithm, as MetaPost requires some positioning information.

Improving the dot output would be an easier short-term target. It can be done by tweaking a bit the dot code itself, but would likely require post-processing of the output (should not be too hard using the SVG backend).

Finally, we could generate code for a modern alternative to dot, which handles node placement but also allows more customization of the look. Any suggestions?

from fastclick.

bcronje avatar bcronje commented on August 23, 2024

Personally I would rather look into something that generates graphs that look something like Meraki's topology map. I'm just guessing here but they probably uses D3 or similar javascript library to generate the map. Any Meraki guys want to comment on what library is used for that map?

from fastclick.

tbarbette avatar tbarbette commented on August 23, 2024

I guess JS would be something different, for live view ?

I'm dreaming for a web interface allowing to drag and drop elements. The HTTPServer element is already very useful to use a REST (or web) interface to play with elements parameters.

But the original question is about "paper" visualization. Are there template for MetaPost Click-like elements ? I mean with the little square or triangles for push/pull, etc

from fastclick.

tbarbette avatar tbarbette commented on August 23, 2024

Maybe @pallas can help here?

from fastclick.

cffs avatar cffs commented on August 23, 2024

Some .js frameworks work on SVG which can then be exported for use in papers. It also has the advantage of limiting the dependencies as we can likely ship the .js library directly with the tool (depending on its license). But which one would be more appropriate?

If we choose to go the MetaPost route instead, I should be able to re-write element template macros if needed. However, we still need to find a way to position the elements. Maybe we could reuse dot output as illustrated in Supporting layout routines in MetaPost.

from fastclick.

bcronje avatar bcronje commented on August 23, 2024

I wasn't aware of HTTPServer element, what does it do?

from fastclick.

bcronje avatar bcronje commented on August 23, 2024

Never mind, found HTTPServer description in the commit message.

On that note we should probably start enforcing that new/updated elements use the Click style element documentation inside the header files?

from fastclick.

tbarbette avatar tbarbette commented on August 23, 2024

Yes we should. I'm trying to go through pull requests for most changes now. Don't hesitate to beat me if that happens again :p

from fastclick.

tbarbette avatar tbarbette commented on August 23, 2024

For further reference, the metapost examples are actually available in etc/diagrams

from fastclick.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.