A python library to convert text to laser. Single stroke fonts or ttf, control of position, typographic sizing, filling.
- Python 98.4%
- Makefile 1%
- Dockerfile 0.6%
The target had a row in the table and nothing else. 40-TESTING now shows the command, the shape of the report, that the CI runs it without ever failing, and its two limits: a test in another process is not counted, and a line that ran counts as covered whether or not it was checked. Task: tasks/20261006-coverage.md Tool: Claude Code Model: claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| .forgejo/workflows | ||
| docs | ||
| fonts | ||
| src/pp_text2laser | ||
| tasks | ||
| tests | ||
| tools | ||
| .dockerignore | ||
| .gitignore | ||
| AGENTS.md | ||
| CHANGELOG.md | ||
| cliff.toml | ||
| CONTRIBUTING.md | ||
| Dockerfile | ||
| Dockerfile.coverage | ||
| Dockerfile.lint | ||
| LICENSE | ||
| Makefile | ||
| pyproject.toml | ||
| README.md | ||
| ROADMAP.md | ||
| SECURITY.md | ||
| VERSION.txt | ||
pp-text2laser
A Python library that turns a text request into the points a laser draws.
pip install --extra-index-url https://git.interhacker.space/api/packages/protonphoton/pypi/simple pp-text2laser
from pp_text2laser import build_converter
converter = build_converter()
frame = converter.frame({"text": "Hello", "size": 120})
print(frame.code) # 200: drawn as asked
print(frame.as_dict()["body"][:3]) # [x, y, color] per point; color 0 moves with the laser off
Python 3.11 or newer. Two dependencies, pyphen and fonttools. Fonts are not included; see docs/10-START_HERE.md.
Documentation
| Page | For |
|---|---|
| 10-START_HERE | installing, a first request, the glossary |
| 20-HOW_TO_USE | every request field, the strategies, the frame and its codes |
| 30-EXTEND | how it is built; your own sink, filling, font or strategy |
| 40-TESTING | the tests, the review cases, the playground |
| 50-LIMITATIONS | what does not work |
| ADR/ | why each decision was taken |
| examples/ | runnable examples, each in its own container |
| ROADMAP, CHANGELOG | what is planned, what changed |
| CONTRIBUTING, SECURITY | contributing, reporting a vulnerability |
Working on it
Docker is the only prerequisite.
make test # the test suite
make review # the review pictures
make help # every target
Packages: https://git.interhacker.space/protonphoton/-/packages. License: GPL-3.0-or-later, see LICENSE.