mirror of
https://github.com//cppla/ServerStatus
synced 2025-10-09 10:22:23 +08:00
update ssview
This commit is contained in:
parent
9fbed62a36
commit
624cac0445
@ -13,7 +13,8 @@ import requests
|
|||||||
import time
|
import time
|
||||||
from prettytable import PrettyTable
|
from prettytable import PrettyTable
|
||||||
|
|
||||||
cp = 'clear' if 'linux' in sys.platform else 'cls'
|
scroll = False
|
||||||
|
clear = lambda: os.system('clear' if 'linux' in sys.platform else 'cls')
|
||||||
|
|
||||||
def sscmd(address):
|
def sscmd(address):
|
||||||
while True:
|
while True:
|
||||||
@ -57,7 +58,8 @@ def sscmd(address):
|
|||||||
"%d%%" % (float(i["hdd_used"]) / i["hdd_total"] * 100),
|
"%d%%" % (float(i["hdd_used"]) / i["hdd_total"] * 100),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
os.system(cp)
|
if scroll is True:
|
||||||
|
clear()
|
||||||
print(ss)
|
print(ss)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user