[Scummvm-git-logs] scummvm master -> 413710a77d39ed4d53fab248ee1dcbd0586254c5

mgerhardy martin.gerhardy at gmail.com
Sun Mar 14 17:53:10 UTC 2021


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
521c63254f DEVTOOLS: convert unicode chars to hex
413710a77d DEVTOOLS: steam_gameid.py doesn't encode !


Commit: 521c63254ffdbe649bf42709c51cee8aa5fa8d63
    https://github.com/scummvm/scummvm/commit/521c63254ffdbe649bf42709c51cee8aa5fa8d63
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-03-14T18:53:02+01:00

Commit Message:
DEVTOOLS: convert unicode chars to hex

Changed paths:
    devtools/steam_achivements.py


diff --git a/devtools/steam_achivements.py b/devtools/steam_achivements.py
index 9c699dccbb..f2b246bc7b 100755
--- a/devtools/steam_achivements.py
+++ b/devtools/steam_achivements.py
@@ -23,6 +23,11 @@ statsurl = "https://steamdb.info/app/{0}/stats/".format(args.steamid)
 if args.verbose:
 	sys.stderr.write('query {0}\n'.format(statsurl))
 
+def cleanup_text(text):
+	text = text.encode(encoding="ascii", errors="backslashreplace").decode()
+	text = text.replace('"','\\"')
+	return text
+
 try:
 	session = HTMLSession()
 	response = session.get(statsurl)
@@ -47,8 +52,8 @@ try:
 		idx       = achievements_columns * i
 		ach_id    = achievements_rows[idx + 0].text.strip()
 		ach_text  = achievements_rows[idx + 1].text.strip()
-		ach_title = ach_text.split('\n')[0].replace('"','\\"')
-		ach_desc  = ach_text.split('\n')[1].replace('"','\\"')
+		ach_title = cleanup_text(ach_text.split('\n')[0])
+		ach_desc  = cleanup_text(ach_text.split('\n')[1])
 		if ach_desc == "Hidden.":
 			print("\t\t\tACHIEVEMENT_HIDDEN_ENTRY(\"%s\", \"%s\")," % (ach_id, ach_title))
 		else:


Commit: 413710a77d39ed4d53fab248ee1dcbd0586254c5
    https://github.com/scummvm/scummvm/commit/413710a77d39ed4d53fab248ee1dcbd0586254c5
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-03-14T18:53:02+01:00

Commit Message:
DEVTOOLS: steam_gameid.py doesn't encode !

this is part of a few game titles and steam doesn't expect
this to be encoded. E.g. 'Ben There, Dan That!'

Changed paths:
    devtools/steam_gameid.py


diff --git a/devtools/steam_gameid.py b/devtools/steam_gameid.py
index 3664540622..faec0ada6f 100755
--- a/devtools/steam_gameid.py
+++ b/devtools/steam_gameid.py
@@ -18,7 +18,9 @@ parser.add_argument('-a', '--all', action='store_true', help="Show all matches,
 parser.add_argument('-v', '--verbose', action='store_true', help="Also print some meta information next to the steam game id")
 args = parser.parse_args()
 
-searchurl = "https://steamdb.info/search/?a=app&q={0}&type=1&category={1}".format(urllib.parse.quote_plus(args.name), args.category)
+searchurl = "https://steamdb.info/search/?a=app&type=1&category={1}&q={0}".format(urllib.parse.quote_plus(args.name, safe='!'), args.category)
+if args.verbose:
+	sys.stderr.write('query url: {0}\n'.format(searchurl))
 
 try:
 	session = HTMLSession()




More information about the Scummvm-git-logs mailing list