replace 'client_id' error with simple 'wrong username and / or password' message, asking for correct username and / or password add pcgw_page script to download PCGamingWiki page (source code only), not yet enabled in main script generate steam_emu.ini for CODEX and RUNE versions, update gse_generate_interfaces
20 lines
467 B
Python
20 lines
467 B
Python
import re
|
|
|
|
ALLOWED_CHARS = set([
|
|
'`', '~', '!', '@',
|
|
'#', '$', '%', '&',
|
|
'(', ')', '-', '_',
|
|
'=', '+', '[', '{',
|
|
']', '}', ';', '\'',
|
|
',', '.', ' ', '\t',
|
|
#'®', '™',
|
|
])
|
|
|
|
def create_safe_name(app_name : str):
|
|
safe_name = ''.join(c for c in f'{app_name}' if c.isalnum() or c in ALLOWED_CHARS)\
|
|
.rstrip()\
|
|
.rstrip('.')\
|
|
.replace(r'\t', ' ')
|
|
safe_name = re.sub(r'\s\s+', ' ', safe_name)
|
|
return safe_name
|