Metadata-Version: 2.4
Name: level-zero
Version: 0.1.0
Summary: Convert building floor numbering to start from 0 — because arrays start at zero
Project-URL: Homepage, https://github.com/brnv/level-zero
Author-email: Artem <brnv@canva.com>
License-Expression: MIT
License-File: LICENSE
Keywords: building,conversion,floors,numbering,zero-indexed
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# level-zero

Convert building floor numbering to start from 0 — because arrays start at zero.

Supports US, UK, European, Japanese, Chinese, and Indian floor systems.

## Installation

```bash
pip install level-zero
```

## Usage

```python
from level_zero import convert, FloorSystem, Building

# Quick conversions
convert("3", FloorSystem.US, FloorSystem.ZERO)        # "2"
convert("G", FloorSystem.UK, FloorSystem.ZERO)         # "0"
convert("5F", FloorSystem.JAPAN, FloorSystem.ZERO)      # "4"
convert("2", FloorSystem.ZERO, FloorSystem.US)          # "3"

# Shorthand helpers
from level_zero.converter import us_to_zero, zero_to_us
us_to_zero(3)    # 2
zero_to_us(0)    # 1

# Full building conversion table
b = Building(name="Empire State", system=FloorSystem.US, total_floors=102, basements=2)
print(b.mapping_table())
print(b.to_zero("13"))   # handles skipped floors
print(b.from_zero("0"))  # "1"
```

## CLI

```bash
level-zero convert 3 --from us --to zero
level-zero convert G --from uk --to us
level-zero building --name "Tokyo Tower" --system japan --floors 20 --basements 3
level-zero systems
```

## Why?

Because `elevator[0]` should be the ground floor.

## License

MIT
