Updated readme, add cover and completed instructions

This commit is contained in:
N07070 2020-12-27 21:10:19 +01:00
parent af267a20f7
commit c38faa940f
2 changed files with 24 additions and 9 deletions

View File

@ -3,6 +3,9 @@
> Print out shit from the cloud.
![Ditherd image of a Adafruit Thermal Printer](dither_it_cover.png)
[CC-BY oomlout](https://commons.wikimedia.org/wiki/File:TPRI-01_(14335248671).jpg)
## About
This project started when I got a Thermal Printer from a friend. I don't really know if you can do anything more, but I guess it's fun.
@ -11,39 +14,52 @@ This project started when I got a Thermal Printer from a friend. I don't really
## Requirements
To make this project work, you will need :
- [A Thermal Printer](https://www.adafruit.com/product/597)
- A Raspberry Pi
- 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 a EPSON TM-T2OIII. It's expensive, but it's also high quality, and has better CUPS and specific library support.
- A Raspberry Pi or any computer with USB or Serial.
- Some electric wires.
- Some knowledge of the command line
- 3h of your time
- Some knowledge of the command line,
- Some knowledge of Python.
- 3h of your time, 5h if things need debugging.
- `git`, `virtualenv`,`pip` and `python` >= 3.8.6.
## Installation
Start by following the guide [here](https://learn.adafruit.com/networked-thermal-printer-using-cups-and-raspberry-pi) to install the CUPS software needed to print images. If you want, you can install it via the command line, [following this guide](https://help.ubuntu.com/lts/serverguide/cups.html).
For the EPSON TM-T20III, you can get the CUPS driver from [here](https://download.epson-biz.com/modules/pos/index.php?page=soft&scat=32). It's not specific to the printer I've been using, so you can try with other printers.
With that, you can try out your printer and print normal text, images or pdf documents for example. LittlePrynter itself does not require any other software than the ones installed with it, i.e the ones listed in the `requirements.txt` file.
For the Adafruit printer, start by following the guide [here](https://learn.adafruit.com/networked-thermal-printer-using-cups-and-raspberry-pi) to install the CUPS software needed to print images. If you want, you can install it via the command line, [following this guide](https://help.ubuntu.com/lts/serverguide/cups.html).
You can also get some information from [here](https://learn.adafruit.com/mini-thermal-receipt-printer) and [here](https://learn.adafruit.com/instant-camera-using-raspberry-pi-and-thermal-printer) if you're stuck.
Then, setup the project :
```
git clone https://git.n07070.xyz/n07070/LittlePrynter
virtualenv LittlePrynter
cd LittlePrynter
pip install -r requirements.txt
```
Now, edit `the users.json` and add a user. **Don't forget to remove the test user.**
You should see a folder named `configuration`. Enter it, and duplicate the file named `config.toml.sample`, and rename the copy to `config.toml`. Now, edit this file by following the comments in the file itself.
You can now start the web server with
```
export FLASK_APP=littleprynter.py
export FLASK_APP=main.py
flask run
```
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à !
## More
If you liked this project, feel free to support my work !
[https://n07070.xyz/post/about-me/about-me/](Donations welcome :-])
[Donations welcome ! :)](https://n07070.xyz/about-me)
## Links
@ -51,7 +67,6 @@ If you liked this project, feel free to support my work !
- [Github repo with CUPS drivers for the Adafruit Thermal Printer ( zj-58 )](https://github.com/klirichek/zj-58)
- [A link to buy one in Europe](https://rlx.sk/sk/various-boards/1829-mini-thermal-receipt-printer-adafruit-597.html)
- [Another link to buy one, direct from factory](https://www.cashinotech.com/csn-a2-58mm-mini-panel-thermal-receipt-printer_p11.html)
-
## Licence

BIN
dither_it_cover.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB