added ispeedtest.py - use args u(pload), d(ownload) or b(oth)

main
The_miro 2025-05-12 09:56:12 +02:00
parent 9e27787067
commit 07a05bce70
1 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,18 @@
import sys
import speedtest
def main():
s = speedtest.Speedtest()
if (sys.argv[1] == 'd') or (sys.argv[1] == 'b'):
gbdl = round( s.download() / (1024**3) , 2)
print("󰛴", gbdl, "Gb/S")
if (sys.argv[1] == 'u') or (sys.argv[1] == 'b'):
gbul = round( s.upload() / (1024**3) , 2)
print("󰛶", gbul, "Gb/S")
if __name__=="__main__":
main()