Text-to-diagram is an innovative approach that allows textual descriptions to be automatically transformed into clear and structured visual representations. This method offers several advantages, including:
- Easier Translations: Information presented in diagram form is universal, reducing the need for linguistic adaptation. When texts are translated, the associated diagrams remain relevant and comprehensible to all.
- Automated Generation: By automating the creation of diagrams from textual data, this approach simplifies the communication of complex ideas, making information more accessible and less prone to interpretation errors.
- Quick Updates: With the right tools, it is possible to update source texts, and the associated diagrams are automatically refreshed, ensuring that the data remains up-to-date.
In this context, I provide a representation and organization of the cybersecurity domains (JSON) based on the work of H. Jiang. This script generates a radial (circular) mindmap for visualizing hierarchical data, such as a cybersecurity framework, using Graphviz.
- Generates mindmaps in radial layout.
- Supports output in
png
orpdf
format. - Customizable node colors and styles.
- Handles nested hierarchical data from JSON.
- Install Python 3.
- Install required dependencies:
pip install -r requirements.txt
- Ensure Graphviz is installed on your system:
- On macOS:
brew install graphviz
- On Ubuntu/Debian:
sudo apt-get install graphviz
- On macOS:
- JSON Data File: Hierarchical data to generate the mindmap.
- colors.json: Optional file to specify custom colors for nodes.
-data
(required): Path to the JSON data file.-type
(optional): Output file type (png
orpdf
). Default ispng
.-title
(optional): Title for the mindmap.
python mindmap_generator.py -data input.json -type pdf -title "Cybersecurity Framework"
This generates a PDF file named cybersecurity_mindmap.pdf
in the current directory.
- mindmap_generator.py: Main script to generate the mindmap.
- colors.json: Optional file to define custom colors for specific nodes.
- requirements.txt: List of Python dependencies.
- Warning: some nodes with margin touch
- Adjust the graph size or node margins in the script.
This project is open-source and available under the MIT License.