Skip to content

Generate Java or Typescript code from a draw.io UML class diagram.

Notifications You must be signed in to change notification settings

Daandelange/DrawioCodeGenerator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Code Generator

drawio_logo plus_sign python_logo equal_sign java_logo

Generate Java code from draw.io UML class diagrams

drawio_logo

check examples/ folder for output of style tree, syntax tree and code for the above diagram

Fork information

This fork adds a Typescript generator, whoms syntax is slightly different and which can then be transpiled to javascript.
The work on getters and setters ahs been stripped in the TypeScript part.

Setup

# if pipenv is not installed :
pip install --user pipenv

# Install dependencies
python -m pipenv install

# Install missing deps & codecs
pip install BeautifulSoup4
pip install lxml

Usage

Run the example :

# Compiles the diagram to both Java an Typescript code
python3 main.py

State

The implementation is very minimal and not all UML Class Diagram syntax is parsed.
Meanwhile, basic class structures are greatly generated and this script provides a quick starting point for implementing a diagram.
Think semi-automatic.

About

Generate Java or Typescript code from a draw.io UML class diagram.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%