Started work on putting together the final OS command.

This commit is contained in:
eworc778 2024-08-19 21:24:02 +01:00
parent a11d481661
commit 7688262394
2 changed files with 15 additions and 2 deletions

3
.gitignore vendored
View File

@ -1 +1,2 @@
file.jpg
*.pdf
*.jpg

14
main.py
View File

@ -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 <mainCategory>-<subCategory>-pg<pageNumber>.jpg -mcolor; magick convert <mainCategory>-<subCategory>-<pageNumber>.jpg img.pdf
finalCommand = "hp-scan -d " + printerURI
finalCommand = finalCommand + "-o " + mainCategory + "-" + subCategory + "-pg" + pageNumber