2023-06-09 13:42:51 +03:00
|
|
|
# thermatext
|
|
|
|
|
2023-06-09 13:47:37 +03:00
|
|
|
fancy name, QL-570 text formater
|
|
|
|
|
2023-06-14 13:35:51 +03:00
|
|
|
using the Brother QL family with support for linux.
|
|
|
|
label printer controled by [brother-ql](https://brother-ql.net/index.html) project
|
2023-06-09 13:47:37 +03:00
|
|
|
|
2023-06-11 12:20:57 +03:00
|
|
|
### TODO
|
2023-06-09 13:47:37 +03:00
|
|
|
- use as printer
|
2023-06-11 12:20:57 +03:00
|
|
|
- works, but cant detect the length of text, will output a set (page?) length
|
|
|
|
- fix missing font defentions
|
|
|
|
- fail to take into account letter width
|
2023-06-14 13:35:51 +03:00
|
|
|
- set output image size as spec
|
|
|
|
```
|
|
|
|
Name Printable px Description
|
|
|
|
62 696 (62mm endless)
|
|
|
|
```
|
2023-06-09 13:47:37 +03:00
|
|
|
- telegram bot (!)
|
2023-06-11 12:20:57 +03:00
|
|
|
|
2023-06-14 13:35:51 +03:00
|
|
|
## Permissions
|
|
|
|
```bash
|
|
|
|
echo 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="04f9", ATTRS{idProduct}=="2028", MODE="0777"' | sudo tee /etc/udev/rules.d/52-QL-BROTHER.rules
|
|
|
|
|
|
|
|
#reload udev rules
|
|
|
|
sudo udevadm control --reload-rules && sudo udevadm trigger
|
|
|
|
```
|
|
|
|
|
2023-06-11 12:20:57 +03:00
|
|
|
## CLI
|
|
|
|
`sudo brother_ql -b pyusb --model QL-570 -p usb://0x04f9:0x2028/000M12345678 print -l 62 logo.png`
|
|
|
|
## python
|
|
|
|
python tries to detect letter width and maximise it to fit the label printer constraints (62mm width)
|
|
|
|
`python thermatext.py "label to print"`
|
|
|
|
|
|
|
|
## inkscape
|
|
|
|
[gptgist](https://gist.github.com/5shekel/98cc4898a1a8c7a5a1b305acc01d4326)
|
|
|
|
|
|
|
|
inskcape user extension path
|
|
|
|
`/home/${USER}/.config/inkscape/extensions`
|
|
|
|
|
|
|
|
symbolic link the dir fro here to the inkscape extension
|
|
|
|
`ln -s /home/${USER}/yair/thermatext/inkscape /home/${USER}/.config/inkscape/extensions/thermatext`
|
|
|
|
then check
|
|
|
|
```bash
|
|
|
|
find ~/.config/inkscape/ -type l
|
|
|
|
```
|
|
|
|
|
2023-06-14 13:35:51 +03:00
|
|
|
## using ql_brother web UI
|
|
|
|
(brother_ql_web](https://github.com/pklaus/brother_ql_web.git) has a web GUI and an restAPI(!)
|
2023-06-11 12:20:57 +03:00
|
|
|
```bash
|
2023-06-14 13:35:51 +03:00
|
|
|
git clone https://github.com/pklaus/brother_ql_web.git
|
|
|
|
cd brother_ql_web
|
|
|
|
python -m venv venv
|
|
|
|
source venv/bin/activate;
|
|
|
|
pip install -r requirements.txt
|
|
|
|
./brother_ql_web.py
|
2023-06-11 12:20:57 +03:00
|
|
|
```
|