From 3ca7811fea671583e49cfb64b45390297cf90947 Mon Sep 17 00:00:00 2001 From: OusmBlueNinja <89956790+OusmBlueNinja@users.noreply.github.com> Date: Tue, 28 Nov 2023 22:43:32 -0600 Subject: [PATCH] BETTER Update --- packages/update.py | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/packages/update.py b/packages/update.py index 0b1fc8c..13af13a 100644 --- a/packages/update.py +++ b/packages/update.py @@ -2,23 +2,42 @@ # Made By Blurple import os, sys, requests, threading, time -fileList = [ - "https://raw.githubusercontent.com/OusmBlueNinja/TermPY/main/packages/builtin.py", - "https://raw.githubusercontent.com/OusmBlueNinja/TermPY/main/packages/nano.py", - "https://raw.githubusercontent.com/OusmBlueNinja/TermPY/main/packages/netget.py", - "https://raw.githubusercontent.com/OusmBlueNinja/TermPY/main/packages/pip.py", - "https://raw.githubusercontent.com/OusmBlueNinja/TermPY/main/packages/update.py" +url = "https://raw.githubusercontent.com/OusmBlueNinja/TermPY/main/packages/" +filenames = [ + "builtin.py", + "calc.py", + "filemanager.py", + "filemanip.py", + "hangman.py", + "nano.py", + "netget.py", + "notebook.py", + "pip.py", + "randomquote.py", + "reminder.py", + "system_info.py", + "test.py", + "top.py", + "update.py", + "vault.py" ] +fileList = [f"{url}{filename}" for filename in filenames] + def download_and_save(url): r = requests.get(url) #print(r.text) fileInstallingCreator = os.path.join(os.path.dirname(os.path.realpath(__file__)), os.path.basename(url)) with open(fileInstallingCreator, "w") as newFile: newFile.write(r.text) + print("\n") def upd(command): - input(f"Settings: {fileList}, {os.path.dirname(os.path.realpath(__file__))}\nPress enter to continue") + print("Programs to download:") + for prg in fileList: + print(prg) + print(f"To path: {os.path.dirname(os.path.realpath(__file__))}\nPress enter to continue") + input() print("Downloading and saving files:")