NoneBot 复盘打卡插件,用于帮助交易者进行每日复盘打卡。支持交易日判断、时间窗口控制、数据统计等功能。
Project description
📖 介绍
NoneBot 复盘打卡插件,用于帮助交易者进行每日复盘打卡。支持交易日判断、时间窗口控制、数据统计等功能。
💿 安装
使用 nb-cli 安装
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装nb plugin install nonebot-plugin-fupan --upgrade
使用 pypi 源安装
nb plugin install nonebot-plugin-fupan --upgrade -i "https://pypi.org/simple"
使用清华源安装
nb plugin install nonebot-plugin-fupan --upgrade -i "https://pypi.tuna.tsinghua.edu.cn/simple"
使用包管理器安装
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令uv
uv add nonebot-plugin-fupan
安装仓库 master 分支
uv add git+https://github.com/zanderzhng/nonebot-plugin-fupan@master
pdm
pdm add nonebot-plugin-fupan
安装仓库 master 分支
pdm add git+https://github.com/zanderzhng/nonebot-plugin-fupan@master
poetry
poetry add nonebot-plugin-fupan
安装仓库 master 分支
poetry add git+https://github.com/zanderzhng/nonebot-plugin-fupan@master
打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入
plugins = ["nonebot_plugin_fupan"]
使用 nbr 安装(使用 uv 管理依赖可用)
nbr 是一个基于 uv 的 nb-cli,可以方便地管理 nonebot2
nbr plugin install nonebot-plugin-fupan
使用 pypi 源安装
nbr plugin install nonebot-plugin-fupan -i "https://pypi.org/simple"
使用清华源安装
nbr plugin install nonebot-plugin-fupan -i "https://pypi.tuna.tsinghua.edu.cn/simple"
⚙️ 配置
在 nonebot2 项目的.env文件中添加下表中的配置项
| 配置项 | 必填 | 默认值 | 说明 |
|---|---|---|---|
| fupan_checkin_start_time | 否 | 15:00 | 打卡开始时间(交易日当天) |
| fupan_checkin_end_time | 否 | 09:00 | 打卡结束时间(下一交易日) |
| fupan_checkin_group_time_windows | 否 | {} | 群组特定时间窗口配置 |
| fupan_checkin_user_time_windows | 否 | {} | 用户特定时间窗口配置 |
高级配置示例
群组特定时间窗口配置
fupan_checkin_group_time_windows = {"123456": {"start_time": "16:00", "end_time": "08:00"}}
用户特定时间窗口配置
fupan_checkin_user_time_windows = {"user123": {"start_time": "17:00", "end_time": "07:00"}}
盘后时间窗口说明
盘后时间窗口定义为:T日收盘后到T+1交易日开盘前的时间段。默认配置为15:00至次日09:00。
🎉 使用
指令表
| 指令 | 权限 | 范围 | 说明 |
|---|---|---|---|
| 复盘/打卡/签到 | 群员 | 群聊/私聊 | 进行复盘打卡 |
| 复盘统计 | 群员 | 群聊/私聊 | 查看个人打卡统计 |
| 复盘排行 | 群员 | 群聊/私聊 | 查看打卡排行榜 |
| 复盘撤销/撤销复盘 | 群员 | 群聊/私聊 | 撤销最后一次打卡 |
| 复盘帮助 | 群员 | 群聊/私聊 | 查看帮助信息 |
| 复盘重置 | 超级用户 | 群聊/私聊 | 重置数据(私聊/群组) |
使用说明
- 用户可以在交易日的盘后时间窗口内进行打卡(默认15:00至下一个交易日的09:00)
- 非交易日(周末、节假日)会自动调整打卡时间窗口
- 每个用户每次盘后只能打卡一次
- 支持查看个人统计和群内排行榜(基于连续打卡次数)
- 支持按群组或用户设置特定的时间窗口
- 用户可以使用"复盘撤销"或"撤销复盘"命令撤销最后一次打卡记录
- 群聊和私聊的数据完全分离,互不影响
- 超级用户可以使用"复盘重置"命令重置数据:
/复盘重置 私聊- 重置所有私聊用户数据/复盘重置 当前群组- 重置当前群组数据/复盘重置 群组<群号>- 重置指定群组数据
- 用户可以使用"复盘帮助"命令查看所有可用指令
- 详细的打卡日志记录功能,包括时间戳、星期分布、交易日信息等统计信息
- 连续打卡计数功能,追踪用户的连续交易日打卡记录
平台限制说明
由于官方QQ机器人的平台限制,用户昵称信息无法获取。昵称显示功能在其他Bot适配器上效果更佳。
🎨 效果图
如果有效果图的话
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nonebot_plugin_fupan-0.1.2.tar.gz.
File metadata
- Download URL: nonebot_plugin_fupan-0.1.2.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b7cec9f553d1d9e14d9436f7754548cc02cd78686a6721e7de125fea5ed7615
|
|
| MD5 |
5b1602956a463b1e4edd824f9b54cd87
|
|
| BLAKE2b-256 |
ebef8f5c9f0430fd9ef26d79eecc913728a70b89a4db96e380114653d0419902
|
Provenance
The following attestation bundles were made for nonebot_plugin_fupan-0.1.2.tar.gz:
Publisher:
release.yml on zanderzhng/nonebot-plugin-fupan
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nonebot_plugin_fupan-0.1.2.tar.gz -
Subject digest:
4b7cec9f553d1d9e14d9436f7754548cc02cd78686a6721e7de125fea5ed7615 - Sigstore transparency entry: 551339036
- Sigstore integration time:
-
Permalink:
zanderzhng/nonebot-plugin-fupan@4876fb53cabeb1867155ed7fad77ab859857e983 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/zanderzhng
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4876fb53cabeb1867155ed7fad77ab859857e983 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nonebot_plugin_fupan-0.1.2-py3-none-any.whl.
File metadata
- Download URL: nonebot_plugin_fupan-0.1.2-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0287f9105a6ad789586d220f69a0ed6de784bc79191a0159589255ebd910cc3
|
|
| MD5 |
98cf825020907955bc65284a96b2694c
|
|
| BLAKE2b-256 |
4e78850513b1907a414fcd60513a1914f6364aa3e07c89d66a447dbf27dd7c0c
|
Provenance
The following attestation bundles were made for nonebot_plugin_fupan-0.1.2-py3-none-any.whl:
Publisher:
release.yml on zanderzhng/nonebot-plugin-fupan
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nonebot_plugin_fupan-0.1.2-py3-none-any.whl -
Subject digest:
c0287f9105a6ad789586d220f69a0ed6de784bc79191a0159589255ebd910cc3 - Sigstore transparency entry: 551339063
- Sigstore integration time:
-
Permalink:
zanderzhng/nonebot-plugin-fupan@4876fb53cabeb1867155ed7fad77ab859857e983 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/zanderzhng
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4876fb53cabeb1867155ed7fad77ab859857e983 -
Trigger Event:
push
-
Statement type: