-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path3-listado-wifi-upv.py
executable file
·83 lines (67 loc) · 1.54 KB
/
3-listado-wifi-upv.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
#!/usr/bin/env python
import common
print("Loading file from disk")
actividades = common.readjson(filename="actividades")
socios = common.readjson(filename="socios")
conclavewifi = [
547,
548,
549,
550,
551,
552,
553,
554,
612,
556,
557,
558,
559,
590,
600,
601,
605,
614,
620,
621,
622,
623,
624,
625,
628,
629,
648,
649,
650,
651,
652,
653,
654,
655,
660,
661,
]
usersconclave = []
print("Procesando actividades...")
for actividad in actividades:
myid = int(actividad["idActivitat"])
nombre = actividad["nom"]
if myid in conclavewifi:
print(myid, nombre)
users = common.readjson(filename=f"{myid}")
for user in users:
if user["estat"] == "INSCRESTNOVA":
usersconclave.append(user["colegiat"]["idColegiat"])
print("Listado para politécnica")
for user in sorted(set(usersconclave)):
for socio in socios:
if user == socio["idColegiat"]:
nombre = socio["persona"]["nom"]
apellidos = socio["persona"]["cognoms"]
nif = socio["persona"]["nif"]
# autoriza = 0
# if isinstance(soci["campsDinamics"], dict) and "1_3_20210707032324pm" in soci["campsDinamics"]:
# if soci["campsDinamics"]["1_3_20210707032324pm"] == 1:
# autoriza = 1
# print("%s,%s,%s,%s" % (nif, cognom, nom, autoriza))
print(f"{nif},{apellidos},{nombre}")