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.

20 lines
391 B
Python

import os
# first scan a page
scanning = "scanimage --resolution 300 --mode gray -o reading.png"
os.system(scanning)
import calendar
import time
# Current GMT time in a tuple format
current_GMT = time.gmtime()
# ts stores timestamp
ts = calendar.timegm(current_GMT)
copy=f"cp reading.png timestamps/reading-{ts}.png"
os.system(copy)
printing = "lp -n 2 reading.png"
os.system(printing)