Update README.md

This commit is contained in:
yshtcn 2023-09-05 15:27:38 +08:00 committed by GitHub
parent d7ed62b5a4
commit cac9f4efb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,3 +19,34 @@
```
2023-08-04 11:46:15.306916 Ping: 8ms. Final URL: http://example.com/heartbeat?ping=8. Response status code: 200
```
## 执行python源代码
如果你需要直接使用源代码,可能需要用到以下几个步骤:
### 确保安装Python
可以从[这里下载最新的python环境](https://python.org/downloads/release/)。
### 安装必要的python库
使用命令行执行以下命令:
···
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pystray pillow requests configparser PySocks
···
### 写一个批处理方便执行
每次使用py命令并不方便可以把以下内容保存为bat文件。
```
@echo off
@echo heartbeat start
cd /d %~dp0
py heartbeat.py
pause
```
### 写一个批处理方便执行(静默)
如果希望后台运行可以把以下内容保存为bat文件执行。
```
@echo off
cd /d %~dp0
start pythonw heartbeat.py
```