7 Commits

Author SHA1 Message Date
851242ce51 添加命令行工具 2024-10-03 00:22:04 +08:00
703fe75a76 添加注释 2024-10-03 00:17:56 +08:00
d24926daeb 添加注释 2024-10-03 00:14:08 +08:00
80ee613746 添加注释 2024-10-03 00:13:57 +08:00
851d1b0b7f 添加注释 2024-10-02 23:03:54 +08:00
f12858a876 添加注释 2024-10-02 23:03:19 +08:00
a0c84037e8 添加注释 2024-10-02 23:02:24 +08:00
3 changed files with 16 additions and 6 deletions

View File

@@ -32,7 +32,7 @@ _✨ 服务器状态 - 客户端 ✨_
Debian系请使用pipx安装
```bash
sudo apt install python3-pipx
sudo apt install pipx
pipx install server-status
```
@@ -79,4 +79,8 @@ EOF'
sudo systemctl enable server-status-client
sudo systemctl start server-status-client
```
```
### 服务端
请在中心服务器上部署 [server-status-server](https://github.com/snowykami/server-status-server)

View File

@@ -3,7 +3,7 @@ name = "server-status"
dynamic = ["version"]
description = "Server status client"
authors = [
{name = "snowykami", email = "snowykami@outlook.com"},
{ name = "snowykami", email = "snowykami@outlook.com" },
]
dependencies = [
"requests>=2.32.3",
@@ -12,12 +12,14 @@ dependencies = [
]
requires-python = ">=3.11"
readme = "README.md"
license = {text = "MIT"}
license = { text = "MIT" }
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[project.scripts]
server-status = "server_status.__main__:main"
[tool.pdm]
distribution = true

View File

@@ -1,10 +1,10 @@
import socket
import sys
from server_status.api import *
from server_status.cmd_parser import server_status_alc
if __name__ == "__main__":
def main():
raw_msg = "server_status " + " ".join(sys.argv[1:])
arp = server_status_alc.parse(raw_msg)
@@ -35,3 +35,7 @@ if __name__ == "__main__":
else:
log("Unknown command, use 'server_status --help' for help/未知命令或参数错误,请使用 'server_status --help' 获取帮助")
if __name__ == "__main__":
main()