Metadata-Version: 2.1
Name: visio-json-export
Version: 0.1.2
Summary: Helps to process Visio JSON Exports in your Python projects.
Home-page: https://geradeaus.engineering/
Author: Thomas Winkel
Author-email: mail@thomas-winkel.de
Requires-Python: >=3.12,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: pydantic (>=2.10.2,<3.0.0)
Project-URL: NuGet, https://www.nuget.org/packages/Geradeaus.VisioJsonExport
Project-URL: Repository, https://github.com/ThomasWinkel
Description-Content-Type: text/markdown

# VisioJsonExport
JSON export that follows the Visio object model.
Allows you to process a document without a Visio application.

The export does only contain specific data like:
- User defined cells
- Properties
- Connections

The export does not contain common data like:
- Regular ShapeSheet cells (positions, colors, etc.)

In future we can extend data as reuired.

## Usage
### Export in .NET
For export we provide a NuGet package:
https://www.nuget.org/packages/Geradeaus.VisioJsonExport
```C#
Geradeaus.VisioJsonExport.ExportHandler exportHandler = new Geradeaus.VisioJsonExport.ExportHandler(Globals.ThisAddIn.Application.ActiveDocument);
exportHandler.Parse();
exportHandler.Export(@"C:\Temp\VisioExport.json");
```

### Process in Python
For processing in Python we provide a package on PyPi:
https://pypi.org/project/visio-json-export
```python
import visio_json_export

visio = visio_json_export.load_file(r'C:\Temp\VisioExport.json')

for page in visio.document.pages.values():
    for shape in page.shapes.values():
        for row_name, user in shape.user_rows.items():
            print(page.name + ' -> ' + shape.name + ' -> ' + row_name + ' = ' + user.value)
        for prop in shape.prop_rows.values():
            print(page.name + ' -> ' + shape.name + ' -> ' + prop.label + ' = ' + prop.value)
```
