支持通过命令行参数指定配置文件路径,优化配置文件加载逻辑

This commit is contained in:
2026-01-26 23:34:52 +08:00
parent 97df85d4f8
commit e2a99b7888
4 changed files with 32 additions and 6 deletions

View File

@@ -33,6 +33,10 @@ cp config.example.yaml data/config.yaml
```bash
go run .
# 或者指定配置文件路径
./BingPaper -config /path/to/config.yaml
# 或者使用简写
./BingPaper -c /path/to/config.yaml
```
项目启动后会自动执行一次抓取任务,并根据 `cron.daily_spec` 设置定时任务。