Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

FR: Graphviz dot language support, ignore Graphviz generated SVGs #271

Closed
ajkq opened this issue Jul 9, 2021 · 4 comments
Closed

FR: Graphviz dot language support, ignore Graphviz generated SVGs #271

ajkq opened this issue Jul 9, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@ajkq
Copy link

ajkq commented Jul 9, 2021

Is it possible to add support for Graphviz files (dot graph description language; extension .gv or .dot)?

It would also be great if Graphviz-generated SVG files could be ignored, especially if the .gv source files are in the same folder and have the same name.

SVGs have the following header:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
 "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.47.3 (20210619.1520)
 -->

OS: macOS 11.4
scc version 3.0.0

@boyter
Copy link
Owner

boyter commented Jul 12, 2021

So pretty much XML then. Yep that should be possible.

Ignores... could be done though .ignore files which would be my preference, as someone may want to actually include it in the count.

@boyter boyter added the enhancement New feature or request label Jul 12, 2021
@ajkq
Copy link
Author

ajkq commented Jul 12, 2021

The .gv/.dot source files are not xml.
A graph looks like this:

digraph {
    subgraph cluster_0 {
        label="Subgraph A";
        a -> b;
        b -> c;
        c -> d;
    }

    subgraph cluster_1 {
        label="Subgraph B";
        a -> f;
        f -> c;
    }
}

Here are a few examples

@boyter
Copy link
Owner

boyter commented Jul 12, 2021

Oh right... I used them in the original post about scc... how the heck could I make that mistake. As for the ignored, yes that's totally possible now actually.

Please forgive me, I have been off the coffee for the last two weeks and still trying to wake my brain up :)

@boyter boyter closed this as completed in 8e72db4 Dec 14, 2021
@boyter
Copy link
Owner

boyter commented Dec 14, 2021

Added into mainline so if you build from there and run it it should pick up .gv/.dot files. However I put it under the name "DOT" in accordance with what wikipedia calls it https://en.wikipedia.org/wiki/DOT_(graph_description_language) and not graphviz as the name. Hoping that works for you.

Let me know if you get odd results, but my initial checks showed it to be fine.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants