A comprehensive collection of automation tools for generating DrawIO diagrams, converting various image formats to DrawIO libraries, and extracting icons from Microsoft Visio stencil files.
This toolkit provides three main automation solutions:
- π XML to DrawIO Generator - Convert structured XML data into professional network diagrams
- πΌοΈ Image to DrawIO Converter - Transform image collections into reusable DrawIO libraries
- π¨ VSS to SVG Converter - Extract icons from Visio stencils for 3D design workflows
Perfect for network engineers, system administrators, and technical documentation teams who need to automate diagram creation and maintain consistent visual standards.
- Automated diagram creation from XML data sources
- Azure network visualization with regions, VNETs, and Fortinet devices
- CSV integration for dynamic interface details
- Professional styling with organized layers and layouts
- Multi-format support: PNG, JPG, SVG, GIF, BMP, WebP
- Batch processing of entire image directories
- Smart sizing with aspect ratio preservation
- Base64 embedding for self-contained libraries
- Visio stencil extraction for official manufacturer icons
- Multiple conversion methods (Python, PowerShell, Online)
- Fortinet product coverage (15+ product categories)
- Eraser AI integration ready for 3D icon creation
- Python 3.13+ (for Python scripts)
- PowerShell 5.1+ (for PowerShell scripts)
- DrawIO Desktop (for importing generated libraries)
# Clone repository git clone <repository-url> cd drawio-automation-toolkit # Install Python dependencies pip install -r requirements.txt pip install -r image-converter-requirements.txtFile: generate-from-xml.ps1
Converts structured XML data into professional Azure Fortinet network diagrams.
# Generate diagram from XML data .\generate-from-xml.ps1 # Output: Azure_Fortinet_Template.drawio (ready to import into DrawIO)Features:
- β Parses Fortinet node data from XML
- β Integrates CSV interface details
- β Creates East/West US regions with VNET layouts
- β Generates on-premises Fortigate nodes with labels
- β Professional styling and network connections
Files: image-to-drawio-converter.py | Convert-ImagesToDrawIO.ps1
Transforms image collections into reusable DrawIO libraries.
# Python version (cross-platform) python image-to-drawio-converter.py --input "icons/" --output "library.drawio" --name "My Icons" # PowerShell version (Windows) .\Convert-ImagesToDrawIO.ps1 -InputPath "icons/" -OutputPath "library.drawio" -LibraryName "My Icons"Features:
- β Multi-format support: PNG, JPG, SVG, GIF, BMP, WebP
- β Batch processing with progress tracking
- β Smart sizing preserves original dimensions
- β Grid layout with customizable spacing
- β Base64 embedding for portable libraries
Files: vss-to-svg-converter.py | vss-to-svg-libvisio.ps1
Extracts icons from Microsoft Visio stencil files for use in modern design tools.
# Python version with Aspose.Diagram python vss-to-svg-converter.py "FortiGate_Series_R22_2025Q2.vss" "FortiGate.svg" # PowerShell version with LibreOffice .\vss-to-svg-libvisio.ps1 -InputFile "FortiGate_Series_R22_2025Q2.vss" -OutputFile "FortiGate.svg"Features:
- β Official Fortinet icons from 15+ product categories
- β Multiple conversion methods for maximum compatibility
- β Batch processing of entire stencil collections
- β Eraser AI integration ready for 3D conversion
Add screenshots here to showcase the tools in action
| Input XML Data | Generated DrawIO Diagram |
|---|---|
| Screenshot of XML structure | Screenshot of generated network diagram |
| Source Images | Generated Library |
|---|---|
| Screenshot of icon folder | Screenshot of DrawIO library interface |
| Visio Stencil | Extracted SVG Icons |
|---|---|
| Screenshot of VSS file | Screenshot of converted SVG files |
π Processing: FortiGate.svg β
FortiGate.svg (64x64) ποΈ Creating DrawIO library: Fortinet Icons β
Library created: fortinet-library.drawio π Summary: 1521 images β fortinet-library.drawio π Processing: 1u.svg β οΈ Could not get size for fortinet_icons/1u.svg: cannot identify image file β
1u.svg (64x64) β
Library created: test-library.drawio # 1. Prepare your data # - Azure_All_Brands_Types.xml (network topology) # - fortigate-interfaces.csv (interface details) # 2. Generate diagram .\generate-from-xml.ps1 # 3. Import into DrawIO # File β Open β Azure_Fortinet_Template.drawio# Convert entire icon collection python image-to-drawio-converter.py --input "./fortinet_icons/" --output "fortinet-complete.drawio" --name "Complete Fortinet Library" # Import into DrawIO for use in diagrams# Convert Fortinet Visio stencils to SVG python vss-to-svg-converter.py "./fortinet_visio/" "./svg_output/" # Convert SVGs to DrawIO library python image-to-drawio-converter.py --input "./svg_output/" --output "fortinet-3d-ready.drawio" --name "Fortinet 3D Icons"drawio-automation-toolkit/ βββ π Core Generators β βββ generate-from-xml.ps1 # XML β DrawIO diagram generator β βββ image-to-drawio-converter.py # Python image converter β βββ Convert-ImagesToDrawIO.ps1 # PowerShell image converter β βββ π¨ Icon Processing β βββ vss-to-svg-converter.py # Python VSS β SVG converter β βββ vss-to-svg-libvisio.ps1 # PowerShell VSS β SVG converter β βββ image-converter-requirements.txt # Python dependencies β βββ π Documentation β βββ README.md # This file β βββ Image-to-DrawIO-README.md # Image converter guide β βββ VSS-to-SVG-README.md # Visio converter guide β βββ ποΈ Build & Config β βββ requirements.txt # Core Python dependencies β βββ image-converter-requirements.txt # Image processing dependencies β βββ π Data Files (Examples) β βββ Azure_All_Brands_Types.xml # Sample XML data β βββ fortigate-interfaces.csv # Sample interface data β βββ fortinet_icons/ # Sample SVG icons (1000+ files) β βββ π― Output Examples βββ Azure_Fortinet_Template.drawio # Generated network diagram βββ test-library.drawio # Single icon test βββ fortinet-batch-library.drawio # Batch conversion result # Core requirements pip install -r requirements.txt # Image processing requirements pip install -r image-converter-requirements.txt # Optional: For advanced image support pip install imageio opencv-python# Install required modules (if needed) Install-Module -Name "RequiredModule" -Scope CurrentUserFor enhanced functionality, consider installing:
- LibreOffice - Free office suite for document conversion
- Inkscape - Professional vector graphics editor
- DrawIO Desktop - For testing generated libraries
graph TD A[XML Network Data] --> B[generate-from-xml.ps1] C[Interface CSV] --> B B --> D[Azure_Fortinet_Template.drawio] D --> E[DrawIO Import] E --> F[Professional Network Diagram] graph TD A[Image Collection] --> B[image-to-drawio-converter.py] C[Visio Stencils] --> D[vss-to-svg-converter.py] D --> E[SVG Icons] E --> B B --> F[DrawIO Library] F --> G[Reusable Icon Library] "Python module not found"
pip install -r requirements.txt"PowerShell execution denied"
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser"VSS conversion fails"
- Try online converter: https://cloudconvert.com/vss-to-svg
- Check if file is password-protected
- Verify Visio installation
"DrawIO import fails"
- Validate XML syntax with online validator
- Check base64 encoding integrity
- Ensure DrawIO version 22.0.0+
# Python with verbose output python image-to-drawio-converter.py --input "./test/" --output "debug.drawio" --verbose # PowerShell with detailed errors .\Convert-ImagesToDrawIO.ps1 -InputPath ".\test\" -OutputPath "debug.drawio" -Verbose| Operation | File Count | Processing Time | Output Size |
|---|---|---|---|
| Single Image | 1 SVG | < 1 second | ~1 KB |
| Icon Batch | 1521 SVGs | ~30 seconds | 322 KB |
| VSS Conversion | 15 VSS files | 2-10 sec each | Varies |
| XML Generation | 18 nodes | < 1 second | 15 KB |
Performance measured on Intel i7, 16GB RAM, SSD storage
We welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
# Clone your fork git clone <your-fork-url> cd drawio-automation-toolkit # Create virtual environment python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate # Install development dependencies pip install -r requirements.txt pip install -r image-converter-requirements.txt pip install pytest black flake8 # Optional: for testing and lintingThis project is licensed under the MIT License - see the LICENSE file for details.
- Aspose.Diagram - Commercial license required for production use
- LibreOffice - MPL 2.0 License (free)
- Inkscape - GPL v2 License (free)
- DrawIO Team for the excellent diagramming platform
- Fortinet for providing comprehensive Visio stencils
- Open Source Community for conversion libraries and tools
- π GitHub Issues
- π§ Email: support@your-project.com
- π‘ GitHub Discussions
- π Feature Request Template
- π Wiki
- π₯ Video Tutorials (Coming Soon)
- Web Interface - Browser-based GUI for all tools
- Docker Support - Containerized deployment
- Cloud Integration - AWS/Azure storage support
- Template Engine - Pre-built diagram templates
- Real-time Collaboration - Multi-user editing support
- Plugin System - Extensible architecture
- AI Integration - Automated diagram suggestions
- Mobile App - iOS/Android companions
- Enterprise Features - LDAP integration, audit trails
- Advanced Analytics - Usage metrics and insights
- Custom Styling Engine - Brand-compliant themes
- API-First Architecture - RESTful API for integrations
β Star this repository if you find it helpful!
π Quick Start β’ π Documentation β’ π Report Issues
Made with β€οΈ for the DrawIO and automation community