Started work on putting together the final OS command.
This commit is contained in:
parent
a11d481661
commit
7688262394
3
.gitignore
vendored
3
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
file.jpg
|
*.pdf
|
||||||
|
*.jpg
|
||||||
|
14
main.py
14
main.py
@ -1,6 +1,6 @@
|
|||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
import os
|
import os, time
|
||||||
|
|
||||||
from os.path import expanduser
|
from os.path import expanduser
|
||||||
home = expanduser("~")
|
home = expanduser("~")
|
||||||
@ -75,3 +75,15 @@ while numberOfPages <= 0:
|
|||||||
os.system("clear")
|
os.system("clear")
|
||||||
print("Invalid input, please try again:")
|
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user