A Python application for converting JSON workflow definitions to various diagram formats including GraphML, PlantUML, and Lucidchart.
-
JSON to GraphML Conversion: Transform JSON workflow definitions into GraphML format
-
GraphML to PlantUML: Generate PlantUML diagrams from GraphML files
-
GraphML to Lucidchart: Convert GraphML to Lucidchart-compatible formats
-
GUI Interface: User-friendly graphical interface for easy conversions
-
Command Line Interface: Batch processing and automation support
-
XML Utilities: Robust XML processing and error correction tools
pip install json2lucid
- Clone the repository
git clone https://github.com/yourusername/JSON2Lucid.git
- Navigate to the project directory
cd JSON2Lucid
- Install dependencies
pip install -r requirements.txt
- Install the package
pip install -e .
Run the converter GUI for an interactive experience:
The graphical interface allows you to:
-
Select input and output files
-
Choose diagram types (sequence or flowchart)
-
Select output formats (GraphML, Lucidchart UML, or Lucidchart CSV)
-
Enable auto-fixing for common format errors
-
View conversion status and logs
Convert between any supported formats:
python format_converter.py input.json -f lucidchart_csv -o output.csv -t flowchart
Arguments:
-
-f, --format: Output format (graphml, lucidchart_uml, lucidchart_csv, puml)
-
-o, --output: Output file path (optional)
-
-t, --type: Diagram type (sequence or flowchart)
-
--no-fix: Disable automatic fixing of format errors
Convert GraphML files to PlantUML notation:
python graphml_to_plantuml.py input.graphml -o output.puml -t class
Convert GraphML files to Lucidchart-compatible formats:
Arguments:
-
-o, --output: Output file path
-
-t, --type: Type of diagram (sequence or flowchart)
-
-f, --format: Output format (uml or csv)
-
--no-fix: Disable automatic fixing of GraphML XML errors
JSON2Lucid expects JSON workflow files in the following format:
{
"flow": {
"entry_condition": "Condition that starts the flow",
"nodes": [
{
"id": "Node_ID",
"entry_condition": "Condition to enter this node",
"responsible_team": "Team responsible for this step",
"core_responsibilities": "What happens in this step",
"completion_criteria": "When this step is considered complete",
"next_handoff_destinations": ["Next_Node_ID1", "Next_Node_ID2"]
}
],
"edges": [
{
"from": "Source_Node_ID",
"condition": "Condition for this transition",
"to": "Target_Node_ID"
}
]
}
}After generating a Lucidchart-compatible CSV:
- Open Lucidchart
- Select Import > Import from > CSV
- Upload the generated CSV file
- Customize your diagram layout
For UML format:
- Open the generated .uml file
- Copy the contents
- Paste into Lucidchart's UML editor
-
converter_gui.py - GUI application for format conversion
-
format_converter.py - Universal converter interface
-
graphml_to_plantuml.py - Converts GraphML to PlantUML notation
-
graphml_to_lucidchart.py - Converts GraphML to Lucidchart formats
-
json_to_graphml.py - Converts JSON workflow definitions to GraphML
-
utils/ - Utility functions for XML processing and diagram generation
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (git checkout -b feature/amazing-feature)
- Commit your changes (git commit -m 'Add some amazing feature')
- Push to the branch (git push origin feature/amazing-feature)
- Open a Pull Request