Metadata-Version: 2.4
Name: netbox-cadplan
Version: 0.2.0
Summary: NetBox plugin: visual floor-plan management linked to Sites and Locations, with DXF/DWG import
Author: G1tHub-PRO, SelfSimon
License: MIT
Project-URL: Homepage, https://github.com/SelfSimon/netbox-cadplan
Project-URL: Repository, https://github.com/SelfSimon/netbox-cadplan
Project-URL: Bug Tracker, https://github.com/SelfSimon/netbox-cadplan/issues
Keywords: netbox,plugin,plan,floorplan,dxf,dwg,sites,locations
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Plugins
Classifier: Framework :: Django
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: System :: Networking
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: ezdxf
Requires-Dist: svgwrite
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: ruff>=0.12.0; extra == "dev"
Requires-Dist: black>=23.0; extra == "dev"
Requires-Dist: pre-commit>=2.20; extra == "dev"
Dynamic: license-file

# netbox-cadplan

NetBox plugin for visual floor-plan management. A plan is attached to a
NetBox `Site` (required) and, optionally, to a `Location` within that site,
based on an imported DXF/DWG file. The plan is split into zones associated
with locations (descendant Locations of the plan's Location, or the whole
site if no Location is specified), with the SVG of each location displayed
in a dedicated tab on its NetBox page.

## Compatibility

| Package | NetBox        | Python |
|---------|---------------|--------|
| 0.1.x   | 4.6.0 – 4.6.99 | ≥ 3.10 |

## Installation

### 1. Install the package

```bash
pip install netbox-cadplan
# or from source:
pip install git+https://github.com/simonlacroix/netbox-cadplan.git
```

### 2. Enable the plugin in NetBox

Add the plugin to `configuration.py` (or `configuration/plugins.py` depending
on your setup):

```python
PLUGINS = [
    # ... other plugins
    'netbox_cadplan',
]
```

### 3. Run migrations and restart NetBox

```bash
python manage.py migrate netbox_cadplan
sudo systemctl restart netbox netbox-rq
```

## Usage

- Import a DXF/DWG file to create a **Plan**, linked to a Site and optionally
  a Location.
- The plan is automatically split into **zones** matched to Locations
  descending from the plan's scope.
- Each Location gets a dedicated tab showing the SVG of its zone.
- Objects (device types with a configured plan shape) can be placed on a
  zone and repositioned interactively.
- Plans can be re-exported to DXF.

## License

MIT — see [LICENSE](LICENSE).

## Contributors

- [Simon Lacroix](https://github.com/simonlacroix) — Original author

## Developer setup

Quick setup for contributors — creates a virtualenv, installs development
dependencies and installs the `pre-commit` git hooks.

PowerShell (Windows):

```powershell
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
pip install -e ".[dev]"
pre-commit install
pre-commit run --all-files
```

POSIX (macOS / Linux):

```bash
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
pip install -e '.[dev]'
pre-commit install
pre-commit run --all-files
```

If you prefer automation, run `scripts/bootstrap.ps1` on Windows or
`scripts/bootstrap.sh` on POSIX systems to perform these steps.
