Metadata-Version: 2.1
Name: diomindmap
Version: 0.1.0
Summary: 
Author: Anrich van Schalkwyk
Author-email: @anrichvs
Requires-Python: >=3.7,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: N2G (==0.3.3)
Requires-Dist: python-igraph (==0.10.6)
Requires-Dist: typer (==0.9.0)
Description-Content-Type: text/markdown

# DioMindmap

DioMindmap allows you to create [Draw.io](https://app.diagrams.net/) mind map diagrams in a simple and intuitive way.

Given a simple indented text file like this:

```text
Root
    First child
        First grandchild
        Second grandchild
    Second child
        First grandchild
        Second grandchild
```

The following diagram will be generated (in Draw.io compatible XML format):

![](docs/sample_diagram.png)

## Installation

```bash
pip install diomindmap
```

## Usage

```bash
diomindmap --input-file <input_file> --output-file <output_file>
```

Use `diomindmap --help` for more information on command line arguments.

### Input file format

The input file is a simple text file that uses indentation to define the hierarchy of the mind map. The indentation
can be either spaces or tabs, but must be consistent throughout the file.

The file may contain multiple root nodes, for example:

```text
Root 1
    First child
        First grandchild
Root 2
    First child
```

In this case each root node will be rendered as a separate tab within Draw.io.

## Implementation details

- The project structure is managed with [Projen](http://projen.io/python.html).
- [Typer](https://typer.tiangolo.com/) is used for CLI related functionality.
- [N2G](https://pypi.org/project/n2g/) is used to generate the Draw.io compatible XML file.

## Contributing

You are more than welcome to contribute to this project. But please note that I will have time to review and merge  
pull requests. I created this project to do one simple thing, and do it well.

I don't currently plan to add any new features. If you would like to take this further, please consider forking the
project.

### Ideas

Even though I don't plan on any new features, the following ideas might be worth considering:

- Support passing the layout algorithm as an argument.
- Support directories as input to batch process an entire directory of input files.
- Write tests.
- Add GitHub actions to run build the project and publish to PyPi.
- Is there a way to directly open the generated XML file in Draw.io?

## License

MIT License

Copyright (c) [2023] [Anrich van Schalkwyk]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


