From 6e94bb890680e4385bb391f33ca0e77d68865088 Mon Sep 17 00:00:00 2001 From: n07070 Date: Fri, 13 Nov 2026 02:41:49 +0100 Subject: [PATCH] Update README --- README.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8b87438..daa971b 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ To make this project work, you will need : - A Thermal Printer : - I used *Adafruit's thermal printer* at first, but it broke down. You can get it [here](https://www.adafruit.com/product/597). - I then used an *EPSON TM-T2OIII*. It's expensive, but it's also high quality, and has better CUPS and specific library support. + - Sometime after, a friend leant me a *Brother QL-650TD* to add support for this type of printer. - A Raspberry Pi or any computer with USB or Serial. - Some electric wires. - Some knowledge of the command line, @@ -37,13 +38,15 @@ You can also get some information from [here](https://learn.adafruit.com/mini-th LittlePrynter itself does not require any other software than the ones installed with it, i.e the ones listed in the `pyproject.toml` file. -The version for the EPSON TM-T20III uses a library called `python-escpos`, which doesn't need a CUPS driver or anything else. It's included in the Python dependencies. +The project supports EPSON label printers as well as Brother label printers, and you can try to adapt it for other printers. For example, using `adafruit-thermal`. -The project only supports the EPSON printer, but you can try to adapt it for other printers. For example, using `adafruit-thermal`, or `brother-ql`. +For the EPSON TM-T20III, LittlePrynter uses a library called `python-escpos`, which doesn't need a CUPS driver or anything else. It's included in the Python dependencies. For the Brother-QL, we use the `brother-ql` library, which is also included. ### Install & setup the project : -Theses commands will copy the software on your computer, go into the directory, then activate a virtual environnement and install all of the project's dependecies. +We use [Poetry](https://python-poetry.org/) to manage the Python environnement and packages. You will need to install it on your computer to install LittlePrynter. + +The following commands will copy the software on your computer, go into the directory, then activate a virtual environnement and install all of the project's dependecies. ``` $ git clone https://git.n07070.xyz/n07070/LittlePrynter @@ -69,6 +72,8 @@ $ flask run --cert=adhoc The `--cert=adhoc` argument will make LittlePrinter accessible in HTTPS with a [self-signed SSL certificate](https://en.wikipedia.org/wiki/Self-signed_certificate). This provides a free and easy way to use HTTPS, but does not provide any trust value. It is, on the other hand, a good way to access the webcam in developpement mode or on a local network, because a HTTPS connexion is required by browsers to access the needed APIs. +You can also use the `run.sh` for this. + This command should start a web server with which you can test your configuration. If you plan on exposing your printer to the Internet, and give it an IP / URL, _please, please, please_, don't run it this way. Look at Flask's documentation and read about running a production server. It's a little more work, but it will prevent your computer/server being hacked in too easily. VoilĂ  ! @@ -81,11 +86,11 @@ Please also say if you had a printer to test your code, and which printer you've ### Code structure -The app is written about the Flask framework. You can start by looking at the code in the `src/` folder, in the `main.py` file. There, you will see that a few classes are initialized. In general, they are two parts to the program : +The app is written around the Flask framework. You can start by looking at the code in the `src/` folder, in the `main.py` file. There, you will see that a few classes are initialized. In general, they are two parts to the program : The Web pages and the API, which are the user-facing parts. This is with what the users will interact, and define how the program is going to be used. The web pages are renderer from the `include/` folder where Jinj2 templates are defined. -The Worker and Printer Queue are the internal parts. When a new thing needs to be printed, usually sent from the Web or API interfaces, a new Task in the type of the document is created, and added to a print queue. Then, a Worker thread looks up the state of the queue every so often and picks jobs to execute on the printers connected to the system. +The Worker and Printer Queue are the internal parts. When a new thing needs to be printed, usually sent from the Web or API interfaces, a new Task of the type of the document is created, and added to a print queue. Then, a Worker thread looks up the state of the queue every so often and picks jobs to execute on the printers connected to the system. The last part of the program is the Raspberry Pi class, that handles to Photomaton mode, which handles button presses, and LED indicator and a flash.