Page 1 of 1

bash after collecting data

Posted: Sat Jan 26, 2019 3:23 pm
by jorampic
hello, is it possible after when the printer has stored or forwarded his data we will be able to do a bash file script, so that we can send the data via ftp to a server? or can do other things?

Greetings from belgiƫ

Re: bash after collecting data

Posted: Sat Jan 26, 2019 4:08 pm
by RWAP
Hi - welcome to the forums.

Yes, the easiest way of doing this would be to set up a script to monitor /home/pi/data/raw for new files and copy them to FTP server.

If you have a look at home/pi/printpcl.sh file as this is what we do for printing captured PCL data.

Re: bash after collecting data

Posted: Mon Oct 26, 2020 12:21 pm
by RWAP
In v3.7 of the Retro-Printer software, this has now been updated to make it easier to understand printpcl.sh and how it works so you can modify it there if you are using the HP conversion.

If you are using Epson ESC/P2 conversion routines, then you can now add a new bash script /home/pi/CustomScript.sh which is launched every time that a page is processed. We pass in 3 parameters - the output_path, the page (print job) being processed and the page number.

To use this, you will need to set /root/config/launch_script to Yes