You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
469 B
Python
15 lines
469 B
Python
import os
|
|
print("starting the pruning process")
|
|
scanning = "sudo scanimage --resolution 300 --mode color -o image.png"
|
|
os.system(scanning)
|
|
os.system("tesseract image.png text.txt -l eng")
|
|
fantasyname = open("text.txt.txt" , "r")
|
|
fantasyname = fantasyname.readlines()
|
|
for line in fantasyname:
|
|
line = line.split(" ")
|
|
for l in line:
|
|
if l!="" or l != ['\n', '\r\n']:
|
|
print(l)
|
|
os.system("echo '"+l+"' > /dev/usb/lp0")
|
|
|