fixed dependency bug

master
Jan Umbach 2023-07-31 19:04:03 +02:00
parent 9f94a738be
commit bd0d04c317
2 changed files with 5 additions and 2 deletions

View File

@ -7,5 +7,6 @@ cd $BASEDIR
python3 -m venv .venv python3 -m venv .venv
. .venv/bin/activate . .venv/bin/activate
pip install -r requirements.txt pip install -r requirements.txt
pip install --force-reinstall -v "Pillow==9.5.0"
echo "Done" echo "Done"

View File

@ -10,8 +10,8 @@ from pdf2image import convert_from_path
downloads_path = str(Path.home() / "Downloads") downloads_path = str(Path.home() / "Downloads")
labelPathDir = downloads_path labelPathDir = downloads_path
labelPath = labelPathDir + "label.pdf" labelPath = labelPathDir + "/label.pdf"
labelPathRot90 = labelPathDir + "label_rot90.pdf" labelPathRot90 = labelPathDir + "/label_rot90.pdf"
printer_identifier = "tcp://192.168.1.70" printer_identifier = "tcp://192.168.1.70"
@ -76,6 +76,8 @@ printPDF(labelPathRot90)
class Event(LoggingEventHandler): class Event(LoggingEventHandler):
def on_modified(self, event): def on_modified(self, event):
path = event.src_path path = event.src_path
print(path)
print(labelPath)
if (path == labelPath or path == labelPathRot90): if (path == labelPath or path == labelPathRot90):
printPDF(path) printPDF(path)