diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8e39ad2..09f7764 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,7 +28,7 @@ jobs: - name: Get version id: get_version - run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/} + run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_OUTPUT - name: Build run: | diff --git a/README-CN.md b/README-CN.md index 1924343..199cf85 100644 --- a/README-CN.md +++ b/README-CN.md @@ -14,6 +14,8 @@ +--- + [English](./README.md) | 中文 # 特点 @@ -27,6 +29,52 @@ - [ ] 视频代理 - [ ] 直播代理 +--- + +# 用法 +## 全局标志: + +``` +-f, --config string config file path + --dev start with dev mode + --env-no-prefix env no SYNCTV_ prefix + --log-std log to std (default true) + --skip-config skip config + --skip-env skip env +``` + +如果你想使用自定义配置文件,你可以使用 `-f` 标志,否则它将使用 `$home/.config/synctv/config.yaml` + +## Init +`synctv init` 来初始化配置文件 + +```bash +synctv init +# or +synctv init -f ./config.yaml +``` + +## Server +`synctv server` 启动服务器 + +```bash +synctv server +# or +synctv server -f ./config.yaml +``` + +服务器默认侦听`127.0.0.1:8080`,您可以在配置文件中更改它 + +示例: + +```yaml +server: + listen: 0.0.0.0 # server listen addr + port: 8080 # server listen port +``` + +--- + # 贡献者 感谢这些出色的人们: diff --git a/README.md b/README.md index 00b5b97..ee65567 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ - + --- English | [中文](./README-CN.md) @@ -29,6 +29,52 @@ English | [中文](./README-CN.md) - [ ] Videos proxy - [ ] Live proxy +--- + +# Usage +## Global Flags: + +``` +-f, --config string config file path + --dev start with dev mode + --env-no-prefix env no SYNCTV_ prefix + --log-std log to std (default true) + --skip-config skip config + --skip-env skip env +``` + +if you want to use a custom config file, you can use `-f` flag, else it will use `$home/.config/synctv/config.yaml` + +## Init +`synctv init` to init config file + +```bash +synctv init +# or +synctv init -f ./config.yaml +``` + +## Server +`synctv server` to start the server + +```bash +synctv server +# or +synctv server -f ./config.yaml +``` + +server default listen on `127.0.0.1:8080`, you can change it in config file + +example: + +```yaml +server: + listen: 0.0.0.0 # server listen addr + port: 8080 # server listen port +``` + +--- + # Contributors Thanks goes to these wonderful people: