Skip to main content

将代码统计嵌入 Bot 中

Project description

NoneBot-Plugin-Wakatime

✨ NoneBot Wakatime 查询插件✨

pypi python pdm-managed alc-resolved

📖 介绍

NoneBot Wakatime 查询插件。将你的代码统计嵌入 Bot 中

💿 安装

以下提到的方法任选 其一 即可

[推荐] 使用 nb-cli 安装 在 Bot 的根目录下打开命令行, 输入以下指令即可安装
nb plugin install nonebot-plugin-wakatime
使用包管理器安装
pip install nonebot-plugin-wakatime
# or, use poetry
poetry add nonebot-plugin-wakatime
# or, use pdm
pdm add nonebot-plugin-wakatime

打开 NoneBot 项目根目录下的配置文件, 在 [plugin] 部分追加写入

plugins = ["nonebot_plugin_wakatime"]

⚙️ 配置

在项目的配置文件中添加下表中的可选配置

[!note] client_idclient_secret 均从 WakaTime App 获取
redirect_uri 即绑定成功后跳转的页面。需在 WakaTime App 配置(只配置一个即可)

配置项 必填 默认值
wakatime__client_id
wakatime__client_secret
wakatime__redirect_uri
wakatime__api_url https://wakatime.com/api/v1
wakatime__background_source default

🎉 使用

[!note] 请注意你的 COMMAND_START 以及上述配置项。

绑定账号

[!important] 首次绑定时向 Bot 发送 /wakatime bind,跟随链接指引进行绑定,成功后会跳转到 redirect_uri 处,code 会附加在 redirect_uri 后面。再次发送 /wakatime bind <code> 即可完成绑定。

/wakatime -b|--bind|bind [code]

解绑

/wakatime revoke

查询信息

/wakatime [@]

📄 许可证

本项目使用 MIT 许可证开源

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot_plugin_wakatime-0.1.7.tar.gz (1.2 MB view hashes)

Uploaded Source

Built Distribution

nonebot_plugin_wakatime-0.1.7-py3-none-any.whl (1.2 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page