Skip to content

Driver, Telegram bot & apps for the thermal "cat printer"

Notifications You must be signed in to change notification settings

renaudgweb/CatPrinter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image text

CatPrinter

Driver, Telegram bot & apps for the thermal "cat printer"

Install script:

sudo chmod +x install.sh && sudo ./install.sh

Choose the Default install : [D] for normal installation

After, you can choose the Web install : [W] for the PHP web log file (installed in /var/www/html/cat/index.php)

(Start install or [S] is for my personal use case)

Reboot after the execution of this script

sudo reboot


You can, if you have Nextcloud Talk app, add a channel_id to have a monitoring bot for the status of the catprinter, to be specified in the configuration files. For this, opens the discussion where you want your bot to send you notifications via the Nextcloud Talk web application. Retrieve the channel ID at the end of the discussion URL. For example, in the following link:

https://your-nextcloud-instance/index.php/call/ybz3dgu#/

The channel ID is: ybz3dgu

You need API keys from : Telegram Bot, OpenWeather and OpenAI

Update the configuration files with your API keys in :

app > config > config.ini

app > config > config.php


Be sure to replace the fonts with your own in the code, the fonts must be in the root folder. Like "Lucida_Console_Regular.ttf".

HTML to image:

wkhtmltoimage --width 384 https://example.com /home/your/path/catprinter/test.png

wkhtmltoimage --width 384 --height 500 https://example.com /home/your/path/catprinter/test.png

Send image:

curl --location -X POST --form 'image=@/home/your/path/catprinter/test.png' --form 'feed="100"' 'localhost:5000'

Send text:

curl --location -X POST --form 'text="Lorem ipsum."' --form 'font="Peignot.ttf"' --form 'size="48"' --form 'feed="100"' 'localhost:5000'

Feed paper:

curl --location --request POST --form 'feed="100"' 'localhost:5000'


Credits

amber-sixel gb01print

xssfox print_server

About

Driver, Telegram bot & apps for the thermal "cat printer"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published