2 unstable releases

0.2.0 Feb 18, 2022
0.1.0 Nov 2, 2021

#5 in #graphviz-dot-language

Download history 1889/week @ 2023-10-14 1493/week @ 2023-10-21 1405/week @ 2023-10-28 1561/week @ 2023-11-04 2127/week @ 2023-11-11 2157/week @ 2023-11-18 1879/week @ 2023-11-25 2290/week @ 2023-12-02 3384/week @ 2023-12-09 2118/week @ 2023-12-16 941/week @ 2023-12-23 2607/week @ 2023-12-30 2370/week @ 2024-01-06 3313/week @ 2024-01-13 2808/week @ 2024-01-20 2007/week @ 2024-01-27

10,994 downloads per month
Used in 21 crates (5 directly)

Custom license

24KB
391 lines

The set of macroses helping to generate the elements of graphviz

The set helps to generate the major components of the graphviz dot notation endevouring to follow comparatively close to the language notation

Description:

In overall, the format of macros is the following one:

  • name or id or any other markers
  • list of vec with a prefix , or seq of elems with a prefix ;

#Note:

  • for the list of items the way to pass vec is the following one: element(.. , vec of items)
  • for the seq of items the way to pass several items is the following one: element(.. ; items+)

Examples:

       fn graph_test() {
       use dot_generator::*;
       use dot_structures::*;

       let g = r#"
       strict digraph t {
           aa[color=green]
           subgraph v {
               aa[shape=square]
               subgraph vv{a2 -> b2}
               aaa[color=red]
               aaa -> bbb
           }
           aa -> be -> subgraph v { d -> aaa}
           aa -> aaa -> v
       }
       "#;

           graph!(strict di id!("t");
             node!("aa";attr!("color","green")),
             subgraph!("v";
               node!("aa"; attr!("shape","square")),
               subgraph!("vv"; edge!(node_id!("a2") => node_id!("b2"))),
               node!("aaa";attr!("color","red")),
               edge!(node_id!("aaa") => node_id!("bbb"))
               ),
             edge!(node_id!("aa") => node_id!("be") => subgraph!("v"; edge!(node_id!("d") => node_id!("aaa")))),
             edge!(node_id!("aa") => node_id!("aaa") => node_id!("v"))
           );
   }

Dependencies