Skip to content

Commit

Permalink
0.2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
lgc2333 committed Nov 7, 2022
1 parent 01e59c6 commit 7195579
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ _✨ 运行状态图片版 for NoneBot2 ✨_
| `PS_BLUR_RADIUS` | 整数(`int`|| `4` | 背景图高斯模糊半径 |
| `PS_FONT` | 文本(`str`||| 自定义字体路径 |
| `PS_CUSTOM_BG` | 文本列表(`List[str]`|| `[]` | 自定义背景图 URL 列表<br/>本地图请使用`file:///文件路径` |
| `PS_FOOTER_SIZE` | 整数(`int`|| `22` | 底部脚注文字大小 |

## 🎉 使用

Expand Down
4 changes: 2 additions & 2 deletions nonebot_plugin_picstatus/config.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from typing import List, Optional, Set, Tuple

from nonebot import get_driver
from pydantic import BaseModel
from typing import List, Optional, Set, Tuple


class Cfg(BaseModel):
Expand All @@ -22,6 +21,7 @@ class Cfg(BaseModel):
ps_ignore_no_io_disk: bool = False
ps_ignore_0b_net: bool = False
ps_custom_bg: List[str] = []
ps_footer_size: int = 22


config: Cfg = Cfg.parse_obj(get_driver().config.dict())
4 changes: 2 additions & 2 deletions nonebot_plugin_picstatus/draw.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ async def draw_net_io():


async def draw_footer(img: Image.Image):
font_22 = get_font(22)
font_footer = get_font(config.ps_footer_size)
draw = ImageDraw.Draw(img)
w, h = img.size
padding = 15
Expand All @@ -460,7 +460,7 @@ async def draw_footer(img: Image.Image):
f"{time.strftime('%Y-%m-%d %H:%M:%S')}"
),
"darkslategray",
font_22,
font_footer,
"ms",
)

Expand Down
2 changes: 1 addition & 1 deletion nonebot_plugin_picstatus/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.2.4.post1"
__version__ = "0.2.5"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "nonebot-plugin-picstatus"
version = "0.2.4.post1"
version = "0.2.5"
description = "A NoneBot2 plugin generates a picture which shows the status of current device"
authors = ["student_2333 <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 7195579

Please sign in to comment.