A tool for converting PlantUML diagrams to Draw.io format.
This project enables the conversion of PlantUML diagrams to Draw.io format, allowing for seamless integration of UML diagrams into various documentation and presentation workflows. The converter currently supports activity diagrams and is continuously being expanded to support additional diagram types.
- 🔄 Conversion of PlantUML activity diagrams to Draw.io format
- 🔍 Automatic detection of PlantUML diagram type
- 🖥️ User-friendly GUI and command-line interface
- 📐 Automatic layout calculation for optimal diagram display
- 🧩 Modular design for easy extensibility
# Clone repository
git clone https://github.com/doubleSlash-net/plantuml2drawio.git
cd plantuml2drawio
# Recommended: Use Python 3.11 for best compatibility
# Create and activate a virtual environment (optional but recommended)
python3.11 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Or install in development mode
pip install -e .
# Using the entry point scripts
./p2d-cli --input examples/activity_examples/simple_activity.puml --output output.drawio
# Or using Python modules
python -m src.plantuml2drawio.core --input examples/activity_examples/simple_activity.puml --output output.drawio
# Using the entry point scripts
./p2d-gui
# Or using Python modules
python -m src.plantuml2drawio.app
The project has been reorganized for better maintainability and extensibility:
plantuml2drawio/
├── README.md # This file
├── LICENSE # License information
├── requirements.txt # Python dependencies
├── setup.py # Setup script for installation
├── p2d-cli # Command-line entry point
├── p2d-gui # GUI entry point
├── src/ # Main source code
│ ├── plantuml2drawio/ # Core package
│ │ ├── core.py # Core functionality
│ │ ├── app.py # GUI application
│ │ └── config.py # Configuration settings
│ └── processors/ # Diagram processors
│ ├── base_processor.py # Base class for processors
│ └── activity_processor.py # Activity diagram processor
├── tests/ # Tests
├── docs/ # Documentation
├── examples/ # Example diagrams
└── resources/ # Resources like icons
Detailed documentation is available in the docs
directory:
The project contains examples in the examples
directory:
PlantUML Input:
@startuml
start
:Step 1;
if (Condition?) then (yes)
:Step 2a;
else (no)
:Step 2b;
endif
:Step 3;
stop
@enduml
Draw.io Output:
- Python 3.11 (recommended) or 3.6+
- customtkinter for GUI
- Regular expressions for parsing
- XML libraries for Draw.io generation
The project provides pre-built executables for both Windows and macOS through GitHub Actions. These executables are automatically built when:
- A new version tag is pushed (e.g.,
v1.0.0
) - The workflow is manually triggered via GitHub Actions UI
- Go to the Releases page to download the latest release
- Or download the latest build artifacts from the Actions page:
p2d-windows
- Windows executable with all dependenciesp2d-macos
- macOS application bundle (.app)
You can build the executables locally using PyInstaller. You only need the runtime dependencies and PyInstaller:
# Install build requirements (includes runtime dependencies)
pip install -r requirements-build.txt
# Build executable (recommended with Python 3.11)
python -m PyInstaller --clean p2d.spec
The built executables will be available in the dist
directory:
- Windows:
dist/p2d/p2d.exe
(with dependencies) - macOS:
dist/p2d.app
(application bundle)
Note: The final executable will include all necessary runtime dependencies, so end users don't need to install Python or any requirements.
- Support for activity diagrams
- Support for usecase diagrams
- Support for sequence diagrams
- Support for class diagrams
- Support for component diagrams
- Advanced layout management
- Integration with PlantUML server
- Web interface
Contributions are welcome! Check out the Extension Possibilities to learn more about possible contributions.
This project is licensed under the MIT License - see the LICENSE file for details.
- PlantUML for the excellent UML diagram syntax
- Draw.io for the open XML format and diagram editing functionality
Created with ❤️ for UML enthusiasts and software developers
Dieses Projekt ermöglicht die Konvertierung von PlantUML-Diagrammen in das Draw.io-Format, wodurch eine nahtlose Integration von UML-Diagrammen in verschiedene Dokumentations- und Präsentationsworkflows ermöglicht wird. Der Konverter unterstützt derzeit Aktivitätsdiagramme und wird kontinuierlich um weitere Diagrammtypen erweitert.
- 🔄 Konvertierung von PlantUML-Aktivitätsdiagrammen in das Draw.io-Format
- 🔍 Automatische Erkennung des PlantUML-Diagrammtyps
- 🖥️ Benutzerfreundliche GUI sowie Kommandozeilenschnittstelle
- 📐 Automatische Layout-Berechnung für optimale Diagrammdarstellung
- 🧩 Modularer Aufbau für einfache Erweiterbarkeit
# Repository klonen
git clone https://github.com/doubleSlash-net/plantuml2drawio.git
cd plantuml2drawio
# Empfohlen: Python 3.11 für beste Kompatibilität verwenden
# Virtuelle Umgebung erstellen und aktivieren (optional, aber empfohlen)
python3.11 -m venv venv
source venv/bin/activate # Unter Windows: venv\Scripts\activate
# Abhängigkeiten installieren
pip install -r requirements.txt
# Oder im Entwicklungsmodus installieren
pip install -e .
# Über die Einstiegsskripte
./p2d-cli --input examples/activity_examples/simple_activity.puml --output output.drawio
# Oder über Python-Module
python -m src.plantuml2drawio.core --input examples/activity_examples/simple_activity.puml --output output.drawio
# Über die Einstiegsskripte
./p2d-gui
# Oder über Python-Module
python -m src.plantuml2drawio.app