Metadata-Version: 2.3
Name: python-code-minimap
Version: 0.1.0
Summary: Pure Python code minimap render.
Keywords: minimap,code,braille,terminal,visualisation
Author: Josiah Outram Halstead
Author-email: Josiah Outram Halstead <josiah@halstead.email>
License: MIT License
         
         Copyright (c) 2025 Josiah Outram Halstead
         
         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.
         
         ---
         
         Copyright (c) 2020-2024 Wenxuan Zhang (https://wfxr.mit-license.org/2020).
         
         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.
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: User Interfaces
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Project-URL: Homepage, https://github.com/joouha/euporie/python-code-minimap
Project-URL: Issues, https://github.com/joouha/euporie/python-code-minimap/issues
Project-URL: Repository, https://github.com/joouha/euporie/python-code-minimap.git
Description-Content-Type: text/markdown

# Python Code Minimap

This is a pure Python port of the wonderful [`code-minimap`](https://github.com/wfxr/code-minimap).

It is a lot slower than the original.

## Usage

```
usage: code-minimap [-h] [--hscale HSCALE] [--vscale VSCALE] [--padding PADDING] [--octant] [file]

Render a Braille minimap of a text file.

positional arguments:
  file                  File to read. Use '-' or omit to read from stdin.

options:
  -h, --help            show this help message and exit
  --hscale, -H HSCALE   Horizontal scaling factor (default: 1.0).
  --vscale, -V VSCALE   Vertical scaling factor (default: 1.0).
  --padding, -p PADDING
                        Pad each output line to this width.
  --octant              Use the octant block character set instead of Braille.
```

```bash
$ python -m code_minimap -V 0.25 -H 0.5 code_minimap.py
⣿⣿⣿⣿⣿⣿⣿⣭⣥⣤⣤⣤⣤⣄⣀⣀⣀⡀
⣿⣿⣿⣿⡿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠇
⣒⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠶⠶⠶⠄
⠶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⣤⣤⣤⣤⣤⠤⠄
⠤⣭⣿⣿⣿⣿⣿⣿⣿⣿⠿⠿⠿⠿⠭⠭⠤⠤⠤⠤⠤
⣀⣤⣿⣿⣿⣛⣛⣛⡛⠃
⣒⣿⣿⣿⣿⣿⣿⣿⣿⣿⣓⣒⣒⣒⣂⣀⣀⣀
⠒⣿⣿⣿⣿⣿⣭⣭⣤⠤⠤⠤⠤⠤
⠛⠿⣿⣿⣷⣶⣶⣶⣤⠤⠤
⠀⠛⠛⠿⣿⣿⣷⣶⣶⡶⠤⠤
⠤⣶⣿⣿⣿⣿⣿⣿⣿⣟⣛⣓⣀⣀⣀⡀
⠀⠿⣿⣿⣿⠿⠭⠭⠭⠭⠭⠭⠭⠭⠉⠉
⠀⣭⣿⣿⣿⣿⣿⣟⣛⣛⣛⣛⡋⠁
⠒⠿⣿⣿⣿⣯⣭⣭⣭⣭⣭⣭⣭⣤⣤⣤⣤⣤⣤⠤
⠒⠛⠛⠛⠛⠛⠋⠉⠉⠉⠉⠉
```

## Installation

```bash
pip install python-code-minimap
```

## Python API


```python
from code_minimap import render

minimap = render(Path("code_minimap.py").read_text(), hscale=0.5, vscale=0.25)
print(minimap)
```

You can also iterate over lines of the minimap using the `iter_minimap_lines` function.
