Added auto mode
Hello,
I added automode the way I have imagined. I kindly ask a review. It worked for the cases I tried.
Currently it works as follows:
python print.py -a #or --auto
[+] Auto print
[+] Adding ftoprint/december.pdf to printing list.
[+] Printing ftoprint/december.pdf, 10.10.16.47.
[+] Printing document...
[+] Document printed successfully
[+] Removing: output.ps, ftoprint/december.pdf.ps.
It reads the config from config.ini
file for this automode:
// config.ini
[settings]
ftoprint_folder = ftoprint
printer = 10.10.16.47
Some issues I could think of:
- It takes relative path of
ftoprint
folder then creates absolute path. This might not work whenprint.py
is run outside working directory. - Similarly it takes
config.ini
as relative import.
Edited by Fatih Durmaz