graphviz2drawio


Namegraphviz2drawio JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/hbmartin/graphviz2drawio/
SummaryConvert graphviz (dot) files to draw.io / lucid (mxGraph) format. Beautiful and editable graphs in your favorite editor.
upload_time2024-08-20 14:34:40
maintainerNone
docs_urlNone
authorHarold Martin
requires_python>=3.10
licenseGPLv3
keywords graphviz graph agraph dot convert conversion draw drawio mxgraph maxgraph
VCS
bugtrack_url
requirements puremagic pygraphviz svg.path
Travis-CI No Travis.
coveralls test coverage
            # graphviz2drawio

[![PyPI - Version](https://img.shields.io/pypi/v/graphviz2drawio)](https://pypi.org/project/graphviz2drawio/)
[![Anaconda-Server Badge](https://anaconda.org/conda-forge/graphviz2drawio/badges/version.svg)](https://anaconda.org/conda-forge/graphviz2drawio)
[![Lint and Test](https://github.com/hbmartin/graphviz2drawio/actions/workflows/lint.yml/badge.svg)](https://github.com/hbmartin/graphviz2drawio/actions/workflows/lint.yml)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![Code style: black](https://img.shields.io/badge/🐧-black-000000.svg)](https://github.com/psf/black)
[![CodeFactor](https://www.codefactor.io/repository/github/hbmartin/graphviz2drawio/badge)](https://www.codefactor.io/repository/github/hbmartin/graphviz2drawio)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=hbmartin_graphviz2drawio&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=hbmartin_graphviz2drawio)

Convert graphviz (dot) files to draw.io / lucid (mxGraph) format. Beautiful and editable graphs in your favorite editor.

## Installation

### macOS

graphviz2drawio can be installed with [Homebrew](https://brew.sh/):

```bash
brew install hbmartin/graphviz2drawio/graphviz2drawio
```

### Linux

It is recommended to use [pipx](https://pipx.pypa.io/stable/) to install and run the CLI tool. If you wish to use the library, you can install with `pip` instead.

Note that the graphviz library is required before installing this package.

#### Ubuntu / Debian

```bash
sudo apt update
sudo apt install pipx graphviz graphviz-dev
pipx install graphviz2drawio
# To update: pipx upgrade graphviz2drawio
```

#### Fedora

```bash
sudo dnf install pipx
pipx ensurepath
pipx install graphviz2drawio
# To update: pipx upgrade graphviz2drawio
```

## Anaconda

```bash
conda install conda-forge::graphviz2drawio
```

## Usage

Run the conversion app on your graphviz file. For example, the command below will create converted files `example1.xml` and `example2.xml`.

```bash
graphviz2drawio example1.dot example2.dot
```

Alternatively, you can specify the output file (but only if there is a single input file)

```bash
graphviz2drawio example.dot -o /path/to/somewhere/new_name.xml
```

Output can also be sent to stdout by using the `--stdout` flag.

Graphs can be piped in from stdin and sent to stdout (default) or to a file with `-o ...`.

## Library Usage

```python
from graphviz2drawio import graphviz2drawio

graph_to_convert = ...
xml = graphviz2drawio.convert(graph_to_convert)
print(xml)
```

where `graph_to_convert` can be any of a file path, file handle, string of dot language, or PyGraphviz.AGraph object

## Built With

* [PyGraphviz](http://pygraphviz.github.io/documentation/pygraphviz-1.4rc1/reference/index.html) - Python interface to Graphviz
* [svg.path](https://github.com/regebro/svg.path) - SVG path objects and parser

## Contributing

Pull requests and issue reports are welcome. For major changes, please open an issue first to discuss what you would like to change.

Thanks to all the people who have contributed to this project.

[![Profile images of all the contributors](https://contrib.rocks/image?repo=hbmartin/graphviz2drawio)](https://github.com/hbmartin/graphviz2drawio/graphs/contributors)

### Development Setup

```bash
git clone git@github.com:hbmartin/graphviz2drawio.git
cd graphviz2drawio
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Replace with the actual path to your dot files
python -m graphviz2drawio test/directed/hello.gv.txt
```

## Roadmap

* Migrate to uv/hatch for packaging and dep mgmt
* Support compatible [arrows](https://graphviz.org/docs/attr-types/arrowType/)
* Support [multiple edges](https://graphviz.org/Gallery/directed/switch.html)
* Support [edges with links](https://graphviz.org/Gallery/directed/pprof.html)

## Legal

© [Harold Martin](https://www.linkedin.com/in/harold-martin-98526971/) - released under [GPLv3](LICENSE.md)

diagrams.net is a trademark and draw.io is a registered trademark of JGraph Limited.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hbmartin/graphviz2drawio/",
    "name": "graphviz2drawio",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "graphviz graph agraph dot convert conversion draw drawio mxgraph maxgraph",
    "author": "Harold Martin",
    "author_email": "harold.martin@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/2d/c5/bb43966bc97368fc7eed9d8a79f0bc7eba8484cf6066f687720b616e957a/graphviz2drawio-1.0.0.tar.gz",
    "platform": null,
    "description": "# graphviz2drawio\n\n[![PyPI - Version](https://img.shields.io/pypi/v/graphviz2drawio)](https://pypi.org/project/graphviz2drawio/)\n[![Anaconda-Server Badge](https://anaconda.org/conda-forge/graphviz2drawio/badges/version.svg)](https://anaconda.org/conda-forge/graphviz2drawio)\n[![Lint and Test](https://github.com/hbmartin/graphviz2drawio/actions/workflows/lint.yml/badge.svg)](https://github.com/hbmartin/graphviz2drawio/actions/workflows/lint.yml)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n[![Code style: black](https://img.shields.io/badge/\ud83d\udc27-black-000000.svg)](https://github.com/psf/black)\n[![CodeFactor](https://www.codefactor.io/repository/github/hbmartin/graphviz2drawio/badge)](https://www.codefactor.io/repository/github/hbmartin/graphviz2drawio)\n[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=hbmartin_graphviz2drawio&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=hbmartin_graphviz2drawio)\n\nConvert graphviz (dot) files to draw.io / lucid (mxGraph) format. Beautiful and editable graphs in your favorite editor.\n\n## Installation\n\n### macOS\n\ngraphviz2drawio can be installed with [Homebrew](https://brew.sh/):\n\n```bash\nbrew install hbmartin/graphviz2drawio/graphviz2drawio\n```\n\n### Linux\n\nIt is recommended to use [pipx](https://pipx.pypa.io/stable/) to install and run the CLI tool. If you wish to use the library, you can install with `pip` instead.\n\nNote that the graphviz library is required before installing this package.\n\n#### Ubuntu / Debian\n\n```bash\nsudo apt update\nsudo apt install pipx graphviz graphviz-dev\npipx install graphviz2drawio\n# To update: pipx upgrade graphviz2drawio\n```\n\n#### Fedora\n\n```bash\nsudo dnf install pipx\npipx ensurepath\npipx install graphviz2drawio\n# To update: pipx upgrade graphviz2drawio\n```\n\n## Anaconda\n\n```bash\nconda install conda-forge::graphviz2drawio\n```\n\n## Usage\n\nRun the conversion app on your graphviz file. For example, the command below will create converted files `example1.xml` and `example2.xml`.\n\n```bash\ngraphviz2drawio example1.dot example2.dot\n```\n\nAlternatively, you can specify the output file (but only if there is a single input file)\n\n```bash\ngraphviz2drawio example.dot -o /path/to/somewhere/new_name.xml\n```\n\nOutput can also be sent to stdout by using the `--stdout` flag.\n\nGraphs can be piped in from stdin and sent to stdout (default) or to a file with `-o ...`.\n\n## Library Usage\n\n```python\nfrom graphviz2drawio import graphviz2drawio\n\ngraph_to_convert = ...\nxml = graphviz2drawio.convert(graph_to_convert)\nprint(xml)\n```\n\nwhere `graph_to_convert` can be any of a file path, file handle, string of dot language, or PyGraphviz.AGraph object\n\n## Built With\n\n* [PyGraphviz](http://pygraphviz.github.io/documentation/pygraphviz-1.4rc1/reference/index.html) - Python interface to Graphviz\n* [svg.path](https://github.com/regebro/svg.path) - SVG path objects and parser\n\n## Contributing\n\nPull requests and issue reports are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\nThanks to all the people who have contributed to this project.\n\n[![Profile images of all the contributors](https://contrib.rocks/image?repo=hbmartin/graphviz2drawio)](https://github.com/hbmartin/graphviz2drawio/graphs/contributors)\n\n### Development Setup\n\n```bash\ngit clone git@github.com:hbmartin/graphviz2drawio.git\ncd graphviz2drawio\npython3 -m venv venv\nsource venv/bin/activate\npip install -r requirements.txt\n# Replace with the actual path to your dot files\npython -m graphviz2drawio test/directed/hello.gv.txt\n```\n\n## Roadmap\n\n* Migrate to uv/hatch for packaging and dep mgmt\n* Support compatible [arrows](https://graphviz.org/docs/attr-types/arrowType/)\n* Support [multiple edges](https://graphviz.org/Gallery/directed/switch.html)\n* Support [edges with links](https://graphviz.org/Gallery/directed/pprof.html)\n\n## Legal\n\n\u00a9 [Harold Martin](https://www.linkedin.com/in/harold-martin-98526971/) - released under [GPLv3](LICENSE.md)\n\ndiagrams.net is a trademark and draw.io is a registered trademark of JGraph Limited.\n",
    "bugtrack_url": null,
    "license": "GPLv3",
    "summary": "Convert graphviz (dot) files to draw.io / lucid (mxGraph) format. Beautiful and editable graphs in your favorite editor.",
    "version": "1.0.0",
    "project_urls": {
        "Bug Reports": "https://github.com/hbmartin/graphviz2drawio/issues",
        "Homepage": "https://github.com/hbmartin/graphviz2drawio/",
        "Source": "https://github.com/hbmartin/graphviz2drawio/"
    },
    "split_keywords": [
        "graphviz",
        "graph",
        "agraph",
        "dot",
        "convert",
        "conversion",
        "draw",
        "drawio",
        "mxgraph",
        "maxgraph"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6ce16fe9913960575366ff5bc97f46832c71228cdf1fed591daaae44a02da194",
                "md5": "063addaa40a3bd462328ec56e2e01ad6",
                "sha256": "a22e5cdd7011520e70d6272211b3592835e06ed268361eefb7cb20aaf547bfdb"
            },
            "downloads": -1,
            "filename": "graphviz2drawio-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "063addaa40a3bd462328ec56e2e01ad6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 40535,
            "upload_time": "2024-08-20T14:34:39",
            "upload_time_iso_8601": "2024-08-20T14:34:39.037516Z",
            "url": "https://files.pythonhosted.org/packages/6c/e1/6fe9913960575366ff5bc97f46832c71228cdf1fed591daaae44a02da194/graphviz2drawio-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2dc5bb43966bc97368fc7eed9d8a79f0bc7eba8484cf6066f687720b616e957a",
                "md5": "6ab352f9babd9082fe57e7f9f2212775",
                "sha256": "5409f11cd080b28d77408817559b6481250b3053cec757ab933b92b3075606a5"
            },
            "downloads": -1,
            "filename": "graphviz2drawio-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "6ab352f9babd9082fe57e7f9f2212775",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 39104,
            "upload_time": "2024-08-20T14:34:40",
            "upload_time_iso_8601": "2024-08-20T14:34:40.350216Z",
            "url": "https://files.pythonhosted.org/packages/2d/c5/bb43966bc97368fc7eed9d8a79f0bc7eba8484cf6066f687720b616e957a/graphviz2drawio-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-20 14:34:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hbmartin",
    "github_project": "graphviz2drawio",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [
        {
            "name": "puremagic",
            "specs": [
                [
                    "==",
                    "1.27"
                ]
            ]
        },
        {
            "name": "pygraphviz",
            "specs": [
                [
                    "==",
                    "1.13"
                ]
            ]
        },
        {
            "name": "svg.path",
            "specs": [
                [
                    "==",
                    "6.3"
                ]
            ]
        }
    ],
    "lcname": "graphviz2drawio"
}
        
Elapsed time: 0.77769s