-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDevNews.py
More file actions
34 lines (29 loc) · 996 Bytes
/
DevNews.py
File metadata and controls
34 lines (29 loc) · 996 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import sys
import os
import requests
folder1_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
sys.path.insert(0, folder1_path)
import kernel
import ekernel
def fetchNOTD():
try:
url = "https://raw.githubusercontent.com/gauthamnair2005/ProcyonCLS-NOTD/main/notd.txt"
response = requests.get(url)
response.raise_for_status()
return response.text
except:
return None
def main():
if len(sys.argv) == 2:
if sys.argv[1] >= "v1.4.0":
ekernel.splashScreen("ProcyonCLS Dev News", "Version 1.1 | Procyonis Computing")
ekernel.printHeader("Dev News")
kernel.printInfo("Today's News")
kernel.printInfo("----------------------")
print(fetchNOTD())
else:
kernel.printError("This version of Dev News is incompatible with current version of ProcyonCLS")
else:
kernel.printError("OS Scope Error")
if __name__ == "__main__":
main()