From 7688262394c6eeaa76d6e097873a3b80d426b1df Mon Sep 17 00:00:00 2001 From: eworc778 Date: Mon, 19 Aug 2024 21:24:02 +0100 Subject: [PATCH] Started work on putting together the final OS command. --- .gitignore | 3 ++- main.py | 14 +++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index bc78172..03d9e91 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -file.jpg +*.pdf +*.jpg diff --git a/main.py b/main.py index 9bb44a7..c7e13e5 100644 --- a/main.py +++ b/main.py @@ -1,6 +1,6 @@ import subprocess -import os +import os, time from os.path import expanduser home = expanduser("~") @@ -75,3 +75,15 @@ while numberOfPages <= 0: os.system("clear") print("Invalid input, please try again:") + +#The inputs have passed validation - onto the fun part :) + +finalCommand = "" + +def putCommandTogether(pageNumber=int()): + + #Final command looks like this: hp-scan -d escl:https://192.168.0.XX:443 -o --pg.jpg -mcolor; magick convert --.jpg img.pdf + + finalCommand = "hp-scan -d " + printerURI + + finalCommand = finalCommand + "-o " + mainCategory + "-" + subCategory + "-pg" + pageNumber