-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpresets.py
132 lines (87 loc) · 3.63 KB
/
presets.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
118
119
120
121
122
123
124
125
126
127
128
129
130
# Fecha: 08/December/2021 - Wednesday
# Autor: Virgilio Murillo Ochoa
# personal github: Virgilio-AI
# linkedin: https://www.linkedin.com/in/virgilio-murillo-ochoa-b29b59203
# contact: [email protected]
import json
# so that you can open the presets correctly
with open('presets.json', 'r') as handle:
fixed_json = ''.join(line for line in handle if not line.startswith('//'))
# to ignore the comments that are inside the file
presets_dt = json.loads(fixed_json)
# get the circadian rithm alarm preset
# configurations for the whole program
active = presets_dt['Active']
alarmActive = presets_dt['alarmActive']
mainCicleRepetition = presets_dt['mainCicleRepetition']
acceptance = mainCicleRepetition/60 + 1;
# main configurations for alerts
alertVolume = presets_dt['alertVolume']
alertActive = presets_dt['alertActive']
# configurations for zoom
zoomClassOpener = presets_dt['zoomClassOpener']
zoomClassRecorderActive = presets_dt['zoomClassRecorderActive']
#
mondayPresets = presets_dt["monday"]
tuesdayPresets = presets_dt["tuesday"]
wednesdayPresets = presets_dt["wednesday"]
thursdayPresets = presets_dt["thursay"]
fridayPresets = presets_dt["friday"]
saturdayPresets = presets_dt["saturday"]
sundayPresets = presets_dt["sunday"]
circadianRitmAlarminfo = presets_dt["circadianRitmAlarminfo"]
circadianRitmAlarmAction = presets_dt["circadianRitmAlarmAction"]
circadianRitmActionTime = presets_dt["circadianRitmActionTime"]
circadianRitmAlarmTime = presets_dt["circadianRitmAlarmTime"]
circadianRitmAlarmVolume = presets_dt["circadianRitmAlarmVolume"]
# configruations for the alarm
timePlaying = presets_dt["timePlaying"]
# =============
# ==== radio alarm =====
# =============
# youtube urls for main alarm
youtubeUrls_minTime = presets_dt["youtubeUrls_minTime"]
# for the printing of the schedule
schedulePrint = presets_dt["schedulePrint"]
# select the directory for recorging the class
zoomClasesDirectory = presets_dt["zoomClasesDirectory"]
def init():
# so that you can open the presets correctly
with open('presets.json', 'r') as handle:
fixed_json = ''.join(line for line in handle if not line.startswith('//'))
# to ignore the comments that are inside the file
presets_dt = json.loads(fixed_json)
# get the circadian rithm alarm preset
# configurations for the whole program
active = presets_dt['Active']
alarmActive = presets_dt['alarmActive']
mainCicleRepetition = presets_dt['mainCicleRepetition']
acceptance = presets_dt['acceptance']
# main configurations for alerts
alertVolume = presets_dt['alertVolume']
alertActive = presets_dt['alertActive']
# configurations for zoom
zoomClassOpener = presets_dt['zoomClassOpener']
zoomClassRecorderActive = presets_dt['zoomClassRecorderActive']
#
mondayPresets = presets_dt["monday"]
tuesdayPresets = presets_dt["tuesday"]
wednesdayPresets = presets_dt["wednesday"]
thursdayPresets = presets_dt["thursay"]
fridayPresets = presets_dt["friday"]
saturdayPresets = presets_dt["saturday"]
sundayPresets = presets_dt["sunday"]
circadianRitmAlarminfo = presets_dt["circadianRitmAlarminfo"]
circadianRitmAlarmAction = presets_dt["circadianRitmAlarmAction"]
circadianRitmActionTime = presets_dt["circadianRitmAlarmAction"]
circadianRitmAlarmTime = presets_dt["circadianRitmAlarmTime"]
circadianRitmAlarmVolume = presets_dt["circadianRitmAlarmVolume"]
# configruations for the alarm
timePlaying = presets_dt["timePlaying"]
# =============
# ==== radio alarm =====
# =============
# youtube urls for main alarm
youtubeUrls_minTime = presets_dt["youtubeUrls_minTime"]
schedulePrint = presets_dt["schedulePrint"]
zoomClasesDirectory = presets_dt["zoomClasesDirectory"]