Skip to main content

Convert graphviz (dot) files into draw.io (mxGraph) format

Project description

graphviz2drawio

pypi Build Status codecov.io

Convert graphviz (dot) files into draw.io (mxGraph) format

Getting Started

Prerequisites

graphviz2drawio requires Python 3 and Graphviz

  • On Mac OS these can be installed with Homebrew:
brew update; brew install python3 graphviz
pip3 install pygraphviz --install-option="--include-path=/usr/local/include/graphviz" --install-option="--library-path=/usr/local/lib/graphviz/"
  • On Ubuntu / Debian based Linux, install graphviz using:
sudo apt install python3-pip graphviz graphviz-dev

If you encounter installation errors you may need to manually install pygraphviz with links to the graphviz libraries

Installation / Upgrade

pip3 install graphviz2drawio --upgrade

Usage

Run the conversion app on your graphviz file

graphviz2drawio example.dot

You can them import the output XML file into draw.io

Python Usage

from graphviz2drawio import graphviz2drawio

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

Limitations

Please open an issue with your dot file to report crashes or incorrectect conversions.

Built With

Contributing

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

Code Formatting

This project is linted with pyflakes and makes strict use of Black for code formatting.

Authors

License

GPLv3

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

graphviz2drawio-0.2.0.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

graphviz2drawio-0.2.0-py3-none-any.whl (29.9 kB view details)

Uploaded Python 3

File details

Details for the file graphviz2drawio-0.2.0.tar.gz.

File metadata

  • Download URL: graphviz2drawio-0.2.0.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.6

File hashes

Hashes for graphviz2drawio-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a74334f51ccf72d197cc4bfed2621068a47f60b03fee5876ffc7dafe0cfbe946
MD5 6cb3040fe4a6fa8500af3dc8f9749295
BLAKE2b-256 c5335bbeacbd82795db2f551acead5208383a6dc37ea33a92290bc86f1544f1f

See more details on using hashes here.

File details

Details for the file graphviz2drawio-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: graphviz2drawio-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 29.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.6

File hashes

Hashes for graphviz2drawio-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fcf852de9db6704092af9a611c8378ac56f50c6870e05ae4d100198220257204
MD5 882b3f6ba86cc2bd80b8c820b60738f5
BLAKE2b-256 4581f5dbe4121330a2b1518b5970adda0a3e2af54081c00867b83496ceb5731f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page