I do something like this, but on command, not automatically, to convert .xlsx files to pdf and then send them to the printer.
Apple computers use a Unix based system, I believe, so this script will send jpgs to the printer you designate.
A Linux programme incron uses inotify to monitor changes to a specific directory. Any time you put a photo in there, it can trigger the bash script below. Read this.
Not Python though!!
Apple computers use a Unix based system, I believe, so this script will send jpgs to the printer you designate.
A Linux programme incron uses inotify to monitor changes to a specific directory. Any time you put a photo in there, it can trigger the bash script below. Read this.
Not Python though!!
Output:#! /bin/bash
# set your paths
JPGfiles="/home/pedro/temp/*.jpg"
backupPath='/home/pedro/backupJPGs/"
for X in $JPGfiles
do
if test $X
then
echo "This is one of the files:"
printf $X;
echo "Now sending the file to the printer ... "
# set your printer
lp -d "EPSON-L380-Series" $X;
# get rid of the jpg after sending to the printer
# or move it to backupPath
# mv $X $backupPath
echo "Junking the jpeg ... "
rm $X;
fi
done
Larz60+ write Jan-22-2022, 10:41 AM:
Using output tags, even though wrong title will format bash scripts properly.
Using output tags, even though wrong title will format bash scripts properly.