Python Code Minimap
This is a pure Python port of the wonderful 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.
$ python -m code_minimap -V 0.25 -H 0.5 code_minimap.py
⣿⣿⣿⣿⣿⣿⣿⣭⣥⣤⣤⣤⣤⣄⣀⣀⣀⡀
⣿⣿⣿⣿⡿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠇
⣒⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠶⠶⠶⠄
⠶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⣤⣤⣤⣤⣤⠤⠄
⠤⣭⣿⣿⣿⣿⣿⣿⣿⣿⠿⠿⠿⠿⠭⠭⠤⠤⠤⠤⠤
⣀⣤⣿⣿⣿⣛⣛⣛⡛⠃
⣒⣿⣿⣿⣿⣿⣿⣿⣿⣿⣓⣒⣒⣒⣂⣀⣀⣀
⠒⣿⣿⣿⣿⣿⣭⣭⣤⠤⠤⠤⠤⠤
⠛⠿⣿⣿⣷⣶⣶⣶⣤⠤⠤
⠀⠛⠛⠿⣿⣿⣷⣶⣶⡶⠤⠤
⠤⣶⣿⣿⣿⣿⣿⣿⣿⣟⣛⣓⣀⣀⣀⡀
⠀⠿⣿⣿⣿⠿⠭⠭⠭⠭⠭⠭⠭⠭⠉⠉
⠀⣭⣿⣿⣿⣿⣿⣟⣛⣛⣛⣛⡋⠁
⠒⠿⣿⣿⣿⣯⣭⣭⣭⣭⣭⣭⣭⣤⣤⣤⣤⣤⣤⠤
⠒⠛⠛⠛⠛⠛⠋⠉⠉⠉⠉⠉
Installation
pip install python-code-minimap
Python API
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.
Metadata
Release files for python-code-minimap 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| python_code_minimap-0.1.1.tar.gz | 6.3 kB | Without provenance | Details for python_code_minimap-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| python_code_minimap-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for python_code_minimap-0.1.1-py3-none-any.whl |
Total release size: 13.6 kB
Release files / python_code_minimap-0.1.1.tar.gz
| Download URL | python_code_minimap-0.1.1.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
451cb6872ab81721b1a7882e0779f370122527a3463bf29175f962678c3d3025
|
|
BLAKE2b-256 checksum How to use checksums |
b106d545e0e1b9999b54c32e12d11f0bad9f11211580d3b20e4b015d74a2026b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.0
|
Release files / python_code_minimap-0.1.1-py3-none-any.whl
| Download URL | python_code_minimap-0.1.1-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
74c8f12f9b8a9edd4ee8d41b0727191a099d618703c6fd5ffa4c833e4bb8445f
|
|
BLAKE2b-256 checksum How to use checksums |
98196ae43df1404866b81e600496caf7ee287fc7db4534de0ce6770ac7d025ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.0
|
Security for python-code-minimap 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.