BETTER Update

This commit is contained in:
OusmBlueNinja 2023-11-28 22:43:32 -06:00 committed by GitHub
parent d92ab1396a
commit 3ca7811fea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,23 +2,42 @@
# Made By Blurple # Made By Blurple
import os, sys, requests, threading, time import os, sys, requests, threading, time
fileList = [ url = "https://raw.githubusercontent.com/OusmBlueNinja/TermPY/main/packages/"
"https://raw.githubusercontent.com/OusmBlueNinja/TermPY/main/packages/builtin.py", filenames = [
"https://raw.githubusercontent.com/OusmBlueNinja/TermPY/main/packages/nano.py", "builtin.py",
"https://raw.githubusercontent.com/OusmBlueNinja/TermPY/main/packages/netget.py", "calc.py",
"https://raw.githubusercontent.com/OusmBlueNinja/TermPY/main/packages/pip.py", "filemanager.py",
"https://raw.githubusercontent.com/OusmBlueNinja/TermPY/main/packages/update.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): def download_and_save(url):
r = requests.get(url) r = requests.get(url)
#print(r.text) #print(r.text)
fileInstallingCreator = os.path.join(os.path.dirname(os.path.realpath(__file__)), os.path.basename(url)) fileInstallingCreator = os.path.join(os.path.dirname(os.path.realpath(__file__)), os.path.basename(url))
with open(fileInstallingCreator, "w") as newFile: with open(fileInstallingCreator, "w") as newFile:
newFile.write(r.text) newFile.write(r.text)
print("\n")
def upd(command): 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:") print("Downloading and saving files:")