alex47exe 3ccce93a74 fix generate_emu_config login, thanks to Sak32009
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
2024-10-14 00:24:49 +01:00

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