-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathutils.py
67 lines (62 loc) · 1.24 KB
/
utils.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
from datetime import datetime
from time import sleep
import random
import re
import platform
from flask import Flask, request, render_template, redirect, url_for
import logging
import os
import webbrowser
import threading
from playsound import playsound
R_TXT=r'^[A-ZÄÖÜ]{1}[a-zA-Z äöüÄÖÜß ]$'
R_NR=r'^[0-9]{1,4}[ ]{0,1}[a-zA-Z]'
R_DATE=r'^\s*(3[01]|[12][0-9]|0?[1-9])\.(1[012]|0?[1-9])\.((?:19|20)\d{2})\s*$'
R_PLZ=r'^[0-9]{5}$'
R_MAIL=r'^(\w|\.|\_|\-)+[@](\w|\_|\-|\.)+[.]\w{2,3}$'
R_TEL=r'^[0-9]{6,16}'
path='./storage.json'
driver_path= {
'Linux': './drivers/chromedriver_linux',
'Darwin': './drivers/chromedriver_darwin',
'Windows': './drivers/chromedriver.exe',
}
clear_str = {
'Linux': 'clear',
'Darwin': 'clear',
'Windows': 'cls',
}
user_data = {
'geb': {
'text': 'Geburtstag (dd.MM.yyyy): ',
'rx': R_DATE
},
'plz': {
'text': 'PLZ: ',
'rx': R_PLZ
},
'lastname': {
'text': 'Nachname: ',
'rx': R_TXT
},
'firstname': {
'text': 'Vorname: ',
'rx': R_TXT
},
'tel': {
'text': 'Telefonnummer: ',
'rx': R_TEL
},
'mail': {
'text': 'E-Mail: ',
'rx': R_MAIL
},
'str':{
'text': 'Straße: ',
'rx': R_TXT
},
'hausnr':{
'text': 'Hausnummer: ',
'rx': R_NR
}
}