|
2 | 2 |
|
3 | 3 | ## 我的动态
|
4 | 4 |
|
5 |
| -Shiro 主题中,有一个可以在顶部显示博主当前正在做的事情的功能,这个功能是通过云函数和 ProcessReporterMac 软件实现的。 |
| 5 | +Shiro 主题中,有一个可以在顶部显示博主当前正在做的事情的功能,这个功能是通过云函数和 ProcessReporter 软件实现的。 |
6 | 6 |
|
7 | 7 | import { ToGitHub } from '@components/ToGitHub';
|
8 | 8 |
|
9 | 9 | <ToGitHub repo="mx-space/ProcessReporterMac" />
|
| 10 | +<ToGitHub repo="TNXG/ProcessReporterWinpy" /> |
| 11 | +<ToGitHub repo="ttimochan/processforlinux" /> |
10 | 12 |
|
11 | 13 | import { Callout, Steps } from 'nextra/components'
|
12 | 14 |
|
13 | 15 | <Callout type="info">
|
14 |
| -目前软件仅有 Mac 版本,如果你有兴趣,可以参照此项目来开发 Windows 版本 |
| 16 | +非常感谢 Innei, timochan, TNXG 的贡献,目前 ProcessReporter 已支持全平台! |
15 | 17 | </Callout>
|
16 | 18 |
|
17 | 19 | <Steps>
|
@@ -112,19 +114,80 @@ export default async function handler(ctx: Context) {
|
112 | 114 |
|
113 | 115 | ### 配置软件
|
114 | 116 |
|
115 |
| -前往 GitHub 仓库,下载最新的 [Release](https://github.com/mx-space/ProcessReporterMac/releases) 版本,下载后打开 ProcessReporter.dmg 文件,将软件拖入「应用程序」文件夹中,然后打开软件。 |
| 117 | +前往对应着你的电脑系统的软件的 GitHub 仓库,下载并打开 ProcessReporter。 |
116 | 118 |
|
117 | 119 | <ToGitHub repo="mx-space/ProcessReporterMac" />
|
| 120 | +<ToGitHub repo="TNXG/ProcessReporterWinpy" /> |
| 121 | +<ToGitHub repo="ttimochan/processforlinux" /> |
118 | 122 |
|
119 |
| -接下来啊你会发现你的系统菜单栏中多了一个图标,点击图标,然后点击「设置」,在弹出的窗口中填入你的信息: |
| 123 | +由于不同平台有不同的使用方法,不同的软件我们会在下方具体讲述。 |
| 124 | +</Steps> |
| 125 | + |
| 126 | +## ProcessReporter `Mac` |
| 127 | + |
| 128 | +打开软件后,你会发现你的系统菜单栏中多了一个图标,点击图标,然后点击「设置」,在弹出的窗口中填入你的信息: |
120 | 129 |
|
121 |
| -- Endpoint:`{你的API地址}/ps/update` (请将 `{你的API地址}` 替换为你的 API 地址,如:`https://api.example.com/api/v2`) |
| 130 | +- Endpoint:`{你的API地址}/fn/ps/update` (请将 `{你的API地址}` 替换为你的 API 地址,如:`https://api.example.com/api/v2`) |
122 | 131 | - API Key:填入你刚刚在云函数中设置的密钥
|
123 | 132 |
|
124 | 133 | 如果你希望软件在开机时自动启动,可以勾选「Launch at login」选项。
|
125 | 134 |
|
126 | 135 | 接着关闭窗口,再次点击菜单栏中的图标,点击「Enable」即可。如果一切正常,刷新一下你的博客你就可以在博客顶部看到你的动态了。
|
127 |
| -</Steps> |
| 136 | + |
| 137 | +## ProcessReporter `Windows` |
| 138 | + |
| 139 | +Windows 版本的使用问题,请前往 [TNXG/ProcessReporterWinpy](https://github.com/TNXG/ProcessReporterWinpy#readme) 查看。 |
| 140 | + |
| 141 | +### 使用 GUI 版本 |
| 142 | + |
| 143 | +在 [Releases](https://github.com/TNXG/ProcessReporterWinpy/releases) 页面下载 `ProcessReporterWinpy_Launcher.exe` |
| 144 | +,配置好 `config.yml` 文件,然后运行 `ProcessReporterWinpy_Launcher.exe` 即可。 |
| 145 | + |
| 146 | +`config.yml` 配置具体配置项以及说明请参考 [TNXG/ProcessReporterWinpy](https://github.com/TNXG/ProcessReporterWinpy#readme)。 |
| 147 | + |
| 148 | +### 使用预编译的二进制文件 |
| 149 | + |
| 150 | +在 [Releases](https://github.com/TNXG/ProcessReporterWinpy/releases) 页面下载 `ProcessReporterWinpy.exe`,配置好 `config.yml` 文件后,在终端运行即可,示例如下 |
| 151 | + |
| 152 | +```powershell |
| 153 | +processforwinpy.exe --path "运行目录的路径" |
| 154 | +``` |
| 155 | + |
| 156 | +`config.yml` 配置具体配置项以及说明请参考 [TNXG/ProcessReporterWinpy](https://github.com/TNXG/ProcessReporterWinpy#readme)。 |
| 157 | + |
| 158 | +### 使用源代码 |
| 159 | + |
| 160 | +下载代码后,修改 `config.yml` 文件,填入你的信息: |
| 161 | + |
| 162 | +- api_url:`{你的API地址}/fn/ps/update` (请将 `{你的API地址}` 替换为你的 API 地址,如:`https://api.example.com/api/v2`) |
| 163 | +- api_key:填入你刚刚在云函数中设置的密钥 |
| 164 | +- report_time: 上报间隔(单位:秒) |
| 165 | + |
| 166 | +接着运行程序即可。如果一切正常,刷新一下你的博客你就可以在博客顶部看到你的动态了。 |
| 167 | + |
| 168 | +## ProcessReporter `Linux` |
| 169 | + |
| 170 | +<ToGitHub repo="ttimochan/processforlinux#readme" /> |
| 171 | + |
| 172 | +在仓库的 [Releases](https://github.com/ttimochan/processforlinux/releases) 页面下载对应的二进制包,解压运行即可,具体请参照项目的 README 进行配置运行。 |
| 173 | + |
| 174 | +安装完成后,新建 `.env.process` 文件,填入你的信息: |
| 175 | + |
| 176 | +```env |
| 177 | +# 你的 key |
| 178 | +API_KEY=your_key |
| 179 | +# 你的云函数地址 |
| 180 | +API_URL={你的API地址}/fn/ps/update |
| 181 | +# 上报时间间隔,单位为秒 |
| 182 | +REPORT_TIME=30 |
| 183 | +# 是否开启媒体状态上报 |
| 184 | +MEDIA_ENABLE=true |
| 185 | +# 是否打印日志 |
| 186 | +LOG_ENABLE=true |
| 187 | +``` |
| 188 | +然后执行程序即可。如果一切正常,刷新一下你的博客你就可以在博客顶部看到你的动态了。 |
| 189 | + |
| 190 | +如果有什么疑问,可以去阅读该项目的 [README](https://github.com/ttimochan/processforlinux#readme) |
128 | 191 |
|
129 | 192 | <style global jsx>{`
|
130 | 193 | .nextra-content pre {
|
|
0 commit comments