Label generator for fasteners stored in the Hackerspace Wrocław workshop.
Install like any standard Python utility. pipx
is recommended for automatic management of venvs:
sudo apt install python3-pipx
pipx install https://github.com/HackerspaceWroclaw/fastener_label_generator
# Usage: fastener-label-generator filename.pdf template_name style_name field=value ...
fastener-label-generator test.pdf martyna martyna description="Śruba z łbem sześciokątnym" thread="M3" length="12" standard="DIN 933" material="ocynk" bolt_image="din933.png"
from fastener_label_generator import FastenerLabelGenerator
pdf_content = FastenerLabelGenerator.generate_pdf("franek", "franek", {"thread": "M3"})
open("label.pdf", "wb").write(pdf_content)
Install the library in Editable mode:
git clone https://github.com/HackerspaceWroclaw/fastener_label_generator ~/fastener_label_generator
python -m venv ~/flg-env
source ~/flg-env/bin/activate
pip install -e ~/fastener_label_generator
and hack away.
- blabel - image generation
- FreeCAD Fasteners Workbench - fasteners icons
- Wikipedia - screwdriver bits icons