-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.py
117 lines (111 loc) · 2.04 KB
/
install.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
import os
import sys
import tempfile as temp
import shutil
import urllib.request as req
baseURL="https://www.openprinting.org/download/PPD/"
driverDir="/etc/"
"""
brother
canon
dell
epson
genicom
gestetner
hp
infoprint
infotec
konica_minolta
kyocera
lanier
lexmark
nrg
oce
oki
ricoh
samsung
savin
sharp
toshiba
utax
xerox
"""
brands = {
"brother": ["","","",""],
"canon": []
}
def donwload(url):
tmp1 = temp.NamedTemporaryFile(delete=False)
shutil.copyfileobj(req.urlopen(url),tmp1)
return tmp
def install(brand):
match brand:
case "brother":
for fn in brands["brother"]:
download(baseURL+"Brother/"+fn)
break
case "canon":
break
case "dell":
break
case "epson":
break
case "infoprint":
break
case "infotec":
break
case "konica" || "konica_minolta":
break
case "kyocera":
break
case "lanier":
break
case "lexmark":
break
case "nrg":
break
case "oce":
break
case "oki":
break
case "ricoh":
break
case "samsung":
break
case "savin":
break
case "sharp":
break
case "toshiba":
break
case "utax":
break
case "xerox":
break
def install_all():
install("brother")
install("canon")
install("dell")
install("epson")
install("genicom")
install("gestetner")
install("hp")
install("infoprint")
install("infotec")
install("konica")
install("kyocera")
install("lanier")
install("lexmark")
install("nrg")
install("oce")
install("oki")
install("ricoh")
install("samsung")
install("savin")
install("sharp")
install("toshiba")
install("utax")
install("xerox")
if __name__ == "__main__":
if sys.argv[1] =! "all": install(args[1])
else: install_all()