Metadata-Version: 2.4
Name: py-xmind16
Version: 0.1.1
Summary: A Python library for creating and editing XMind 16 files
Author-email: Author <author@example.com>
License: MIT
Project-URL: Homepage, https://github.com/example/py-xmind16
Project-URL: Repository, https://github.com/example/py-xmind16
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Requires-Dist: black>=23.0; extra == "dev"
Requires-Dist: flake8>=6.0; extra == "dev"
Dynamic: license-file
Dynamic: requires-python

# py-xmind16

A Python library for creating and editing XMind 16 files.

## Features

- Create XMind 16 compatible files
- Read and modify existing XMind files
- Support for topics, subtopics, notes, labels, and markers
- Multiple sheets per workbook
- Simple and intuitive API

## Installation

```bash
pip install py-xmind16
```

## Quick Start

### Create a Simple Mind Map

```python
from py_xmind16 import Workbook

# Create a new workbook
workbook = Workbook()

# Create a sheet
sheet = workbook.create_sheet("My Mind Map")

# Get the root topic and add content
root = sheet.get_root_topic()
root.title = "Project Ideas"

# Add subtopics
tech = root.add_subtopic("Technology")
tech.add_subtopic("AI/ML")
tech.add_subtopic("Web Development")

# Save the file
workbook.save("my_ideas.xmind")
```

### Load and Edit an Existing File

```python
from py_xmind16 import Workbook

# Load an existing file
workbook = Workbook.load("existing.xmind")

# Get the first sheet
sheet = workbook.get_sheet(0)
root = sheet.root_topic

# Modify content
root.title = "Updated Title"
root.add_subtopic("New Topic")

# Save changes
workbook.save("updated.xmind")
```

## API Reference

### Workbook

The main container for XMind content.

```python
workbook = Workbook()
sheet = workbook.create_sheet("Sheet Title")
workbook.save("output.xmind")
```

### Sheet

Represents a single mind map canvas.

```python
sheet = workbook.create_sheet("My Sheet")
root = sheet.get_root_topic()
```

### Topic

Represents a node in the mind map.

```python
topic = root.add_subtopic("Topic Title")
topic.notes = "Detailed notes"
topic.add_label("important")
topic.add_marker("priority-1")
```

## Examples

See the `examples/` directory for more usage examples:

- `create_simple.py` - Create a basic mind map
- `create_testcases.py` - Create a test case structure
- `edit_existing.py` - Edit an existing XMind file

## Development

### Setup

```bash
git clone https://github.com/example/py-xmind16.git
cd py-xmind16
pip install -e ".[dev]"
```

### Run Tests

```bash
pytest
```

### Run with Coverage

```bash
pytest --cov=py_xmind16
```

## License

MIT License - see LICENSE file for details.
