From 2e77e7d9ddd1c1be162f8c3cedaae37af40ce829 Mon Sep 17 00:00:00 2001 From: Jeffrey04 Date: Fri, 14 Jun 2024 00:23:37 +0800 Subject: [PATCH 1/6] change in godot download page --- umake/frameworks/games.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/umake/frameworks/games.py b/umake/frameworks/games.py index e230e5c1..4ea4d20e 100644 --- a/umake/frameworks/games.py +++ b/umake/frameworks/games.py @@ -21,6 +21,7 @@ """Game IDEs module""" from contextlib import suppress +from html.parser import HTMLParser from gettext import gettext as _ import logging import os @@ -194,7 +195,7 @@ def parse_download_link(self, line, in_download): url = None if '{}.zip'.format(self.arch_trans[get_current_arch()]) in line: in_download = True - p = re.search(r'(.*\.zip)', line) + p = re.search(r'.*href=(.*\.zip)', line) with suppress(AttributeError): url = p.group(1) bin = re.search(r'(Godot.*)\.zip', url) From e176cc66316744985fbbf6980bc6dacbd08a55ed Mon Sep 17 00:00:00 2001 From: Jeffrey04 Date: Fri, 14 Jun 2024 00:26:33 +0800 Subject: [PATCH 2/6] remove unused import --- umake/frameworks/games.py | 1 - 1 file changed, 1 deletion(-) diff --git a/umake/frameworks/games.py b/umake/frameworks/games.py index 4ea4d20e..03ee0511 100644 --- a/umake/frameworks/games.py +++ b/umake/frameworks/games.py @@ -21,7 +21,6 @@ """Game IDEs module""" from contextlib import suppress -from html.parser import HTMLParser from gettext import gettext as _ import logging import os From cbea1d4564e536df55452b74f28f3ccf6d7bc96c Mon Sep 17 00:00:00 2001 From: Jeffrey04 Date: Thu, 27 Jun 2024 23:56:00 +0800 Subject: [PATCH 3/6] update godot icon svg --- umake/frameworks/games.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/umake/frameworks/games.py b/umake/frameworks/games.py index 03ee0511..6957fec5 100644 --- a/umake/frameworks/games.py +++ b/umake/frameworks/games.py @@ -182,7 +182,7 @@ def __init__(self, **kwargs): desktop_filename="godot.desktop", required_files_path=['godot'], **kwargs) - self.icon_url = "https://godotengine.org/themes/godotengine/assets/download/godot_logo.svg" + self.icon_url = "https://godotengine.org/assets/press/icon_color.png" self.icon_filename = "Godot.svg" arch_trans = { From b92e911f8ee0580e6b2bdbb883ff0eceeeb6933d Mon Sep 17 00:00:00 2001 From: Jeffrey04 Date: Thu, 27 Jun 2024 23:56:25 +0800 Subject: [PATCH 4/6] refine regex to better capture zip url --- umake/frameworks/games.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/umake/frameworks/games.py b/umake/frameworks/games.py index 6957fec5..6d0d88b7 100644 --- a/umake/frameworks/games.py +++ b/umake/frameworks/games.py @@ -194,7 +194,7 @@ def parse_download_link(self, line, in_download): url = None if '{}.zip'.format(self.arch_trans[get_current_arch()]) in line: in_download = True - p = re.search(r'.*href=(.*\.zip)', line) + p = re.search(r'.*href=\"?([^\s]+\.zip)', line) with suppress(AttributeError): url = p.group(1) bin = re.search(r'(Godot.*)\.zip', url) From 655db7f27c35e262f47e4037f80bea71773f7e12 Mon Sep 17 00:00:00 2001 From: Jeffrey04 Date: Fri, 28 Jun 2024 00:03:25 +0800 Subject: [PATCH 5/6] use svg instead of png logo --- umake/frameworks/games.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/umake/frameworks/games.py b/umake/frameworks/games.py index 78efe210..f18b1af5 100644 --- a/umake/frameworks/games.py +++ b/umake/frameworks/games.py @@ -196,7 +196,7 @@ def __init__(self, **kwargs): desktop_filename="godot.desktop", required_files_path=['godot'], **kwargs) - self.icon_url = "https://godotengine.org/assets/press/icon_color.png" + self.icon_url = "https://godotengine.org/assets/press/icon_color.svg" self.icon_filename = "Godot.svg" arch_trans = { From 411f9e8657976d8c5e0ad346aa3f4822a5b98dec Mon Sep 17 00:00:00 2001 From: Jeffrey04 Date: Fri, 28 Jun 2024 00:56:54 +0800 Subject: [PATCH 6/6] update regex to skip parsing earlier tokens --- umake/frameworks/games.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/umake/frameworks/games.py b/umake/frameworks/games.py index f18b1af5..af56bd2d 100644 --- a/umake/frameworks/games.py +++ b/umake/frameworks/games.py @@ -208,7 +208,7 @@ def parse_download_link(self, line, in_download): url = None if '{}.zip'.format(self.arch_trans[get_current_arch()]) in line: in_download = True - p = re.search(r'.*href=\"?([^\s]+\.zip)', line) + p = re.search(r'href=\"?([^\s]+\.zip)', line) with suppress(AttributeError): url = p.group(1) bin = re.search(r'(Godot.*)\.zip', url)