Metadata-Version: 1.1
Name: foliantcontrib.graphviz
Version: 1.0.0
Summary: GraphViz diagrams preprocessor for Foliant.
Home-page: https://github.com/foliant-docs/foliantcontrib.graphviz
Author: Daniil Minukhin
Author-email: ddddsa@gmail.com
License: MIT
Description: # Graphviz Diagrams Preprocessor for Foliant
        
        [Graphviz](http://plantuml.com/) is an open source graph visualization tool. This preprocessor converts Graphviz diagram definitions in the source and converts them into images on the fly during project build.
        
        ## Installation
        
        ```bash
        $ pip install foliantcontrib.graphviz
        ```
        
        ## Config
        
        To enable the preprocessor, add `graphviz` to `preprocessors` section in the project config:
        
        ```yaml
        preprocessors:
            - graphviz
        ```
        
        The preprocessor has a number of options:
        
        ```yaml
        preprocessors:
            - graphviz:
                cache_dir: !path .diagramscache
                graphviz_path: dot
                engine: dot
                format: png
                params:
                    ...
        ```
        
        `cache_dir`
        :   Path to the directory with the generated diagrams. It can be a path relative to the project root or a global one; you can use `~/` shortcut.
        
        >   To save time during build, only new and modified diagrams are rendered. The generated images are cached and reused in future builds.
        
        `graphviz_path`
        :   Path to Graphviz launcher. By default, it is assumed that you have the `dot` command in your `PATH`, but if Graphviz uses another command to launch, or if the `dot` launcher is installed in a custom place, you can define it here.
        
        `engine`
        :   Layout engine used to process the diagram source. Available engines: (`circo`, `dot`, `fdp`, `neato`, `osage`, `patchwork`, `sfdp` `twopi`). Default: `dot`
        
        `format`
        :   Output format of the diagram image. Available formats: [tons of them](https://graphviz.gitlab.io/_pages/doc/info/output.html). Default: `png`
        
        `params`
        :   Params passed to the image generation command:
        
                preprocessors:
                    - graphviz:
                        params:
                            Gdpi: 100
        
        >To see the full list of params, run the command that launches Graphviz, with `-?` command line option.
        
        
        ## Usage
        
        To insert a diagram definition in your Markdown source, enclose it between `<<graphviz>...</graphviz>` tags:
        
        ```markdown
        Here’s a diagram:
        
        <<graphviz>
            a -> b
        </graphviz>
        ```
        
        You can set any parameters in the tag options. Tag options have priority over the config options so you can override some values for specific diagrams while having the default ones set up in the config.
        
        Tags also have an exclusive `caption` option — the markdown caption of the diagram image.
        
        ```markdown
        Diagram with a caption:
        
        <<graphviz caption="Whole system diagram"
                   params="Earrowsize: 0.5">
            a -> b
        </graphviz>
        ```
        
        You can override `params` values from the preprocessor config for each diagram. Also you can use `format` alias for `-t*` params:
        
        ```markdown
        By default, diagrams are in PNG. But this diagram is in EPS:
        
        <<plantuml caption="Vector diagram" format="eps">
            @startuml
                ...
            @enduml
        </plantuml>
        ```
        
Platform: any
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Documentation
Classifier: Topic :: Utilities
