Add changelog, uniform naming, prepare v0.2.0 tagging (#18)
All checks were successful
Build ptprnt / build (push) Successful in 3m52s

Reviewed-on: moritz/ptouch-prnt#18
This commit was merged in pull request #18.
This commit is contained in:
2025-10-16 19:36:15 +00:00
parent 4c94cae088
commit d3e137ff9c
9 changed files with 134 additions and 53 deletions

View File

@@ -1,57 +1,50 @@
# ptprnt
This is a rewrite of [ptouch-print](https://git.familie-radermacher.ch/linux/ptouch-print.git) as a toy project for my personal amusement. The currently available solutions are good enough for generating labels, but i wanted to explore libusb and maybe improve the functionality of my label printer. All credits for reverse engineering the USB commands to Dominic Rademacher.
A command-line label printer driver for Brother P-touch printers on Linux. Prints text labels directly from your terminal.
## Dependencies
This project requires:
- spdlog
- libusb
- pango
- cairo
- meson
- gtest (optional, for testing, will be installed by meson)
- gcov (optional, for coverage reports)
## Quick Start
Install dependencies on Arch Linux
``` bash
pacman -S libusb spdlog pango cairo meson gcovr
```
Install dependencies on Debian/Ubuntu
``` bash
apt-get install libusb-1.0-0-dev libspdlog-dev libfmt-dev libpango1.0-dev libcairo2-dev meson gcovr
```
## Build
Clone the repository and simply let meson do the heavy lifting.
**Install dependencies:**
Arch Linux:
```bash
meson setup builddir
```
If you want to generate coverage reports, enable them via the command line switch
```bash
meson setup builddir -Db_coverage=true
pacman -S libusb spdlog pango cairo meson
```
Rebuild by simply invoking ninja
Debian/Ubuntu:
```bash
apt-get install libusb-1.0-0-dev libspdlog-dev libfmt-dev libpango1.0-dev libcairo2-dev meson
```
**Build and run:**
Clone this repository first and enter the directory. Then build:
```bash
meson setup builddir
ninja -C builddir
builddir/ptprnt --help
```
## Run
Run the binary from your builddir
```bash
builddir/ptprnt
```
## Supported Printers
(I need more printers for verification 😉)
## Test
Testing is done via gtest. To run your test simply invoke ninja with the "test" target.
- Brother P-touch P700 series
## Developer info
This is a modern C++20 rewrite of [ptouch-print](https://git.familie-radermacher.ch/linux/ptouch-print.git). Credits to Dominic Rademacher for reverse engineering the USB protocol.
**Running tests:**
```bash
ninja -C builddir test
ninja -C builddir test
```
Coverage reports can be generated via gcov if you enabled them (see Build section) by building the `coverage-text` target.
**Coverage reports:**
```bash
meson setup builddir -Db_coverage=true
ninja -C builddir
ninja -C builddir test
ninja -C builddir coverage-text
```
## License