From 91897ce06116797017592fff570a1ca92b27d954 Mon Sep 17 00:00:00 2001 From: BarsTiger Date: Sat, 5 Mar 2022 21:41:04 +0200 Subject: [PATCH] Updated uploader for more files --- horsygui.py | 2 ++ modules/uploader.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/horsygui.py b/horsygui.py index b747333..f2234fc 100644 --- a/horsygui.py +++ b/horsygui.py @@ -200,6 +200,8 @@ def get_users_apps(): ui.manage_packages_table.clear() ui.manage_packages_table.setColumnCount(4) ui.manage_packages_table.setRowCount(math.ceil(len(apps) / 4)) + print(math.ceil(len(apps) / 4)) + print(apps) for i in range(len(apps)): ui.manage_packages_table.setItem(i // 4, i % 4, QtWidgets.QTableWidgetItem(str(apps[i]))) except: diff --git a/modules/uploader.py b/modules/uploader.py index 93a92db..876e063 100644 --- a/modules/uploader.py +++ b/modules/uploader.py @@ -14,7 +14,7 @@ def matches(s): def urlmatch(s): - return re.match("^https?://.*.(?:zip|exe)$", s) is not None + return re.match("^https?://.*.(?:zip|exe|py|msi|js|bat|cmd|ps1)$", s) is not None def upload(is_gui=False, ui=None): @@ -47,7 +47,7 @@ def upload(is_gui=False, ui=None): while url is None: url = input('> ') if not urlmatch(url): - print('[red]Invalid file url, also it should end on .exe or .zip[/red]') + print('[red]Invalid file url, also it should end on .exe, .zip, .py, .msi, .js, .bat, .cmd, .ps1[/red]') url = None print('Please paste there url of your project on GitHub or somewhere else. It should be a link to source code '