{"id":16804421,"url":"https://github.com/he0119/nonebot-plugin-wordcloud","last_synced_at":"2025-04-04T16:11:08.163Z","repository":{"id":36978384,"uuid":"453353992","full_name":"he0119/nonebot-plugin-wordcloud","owner":"he0119","description":"适用于 NoneBot2 的词云插件","archived":false,"fork":false,"pushed_at":"2024-10-07T23:09:21.000Z","size":13105,"stargazers_count":87,"open_issues_count":9,"forks_count":7,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-14T09:44:44.431Z","etag":null,"topics":["nonebot2","plugin"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/nonebot-plugin-wordcloud/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/he0119.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-29T09:32:52.000Z","updated_at":"2024-10-11T02:21:25.000Z","dependencies_parsed_at":"2023-10-03T12:46:53.197Z","dependency_job_id":"6ade99fd-6a05-47fe-940e-b6f849bef514","html_url":"https://github.com/he0119/nonebot-plugin-wordcloud","commit_stats":{"total_commits":136,"total_committers":5,"mean_commits":27.2,"dds":"0.13970588235294112","last_synced_commit":"a1b9aacce6f59e4722504b283a7bca67b0fb19c4"},"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/he0119%2Fnonebot-plugin-wordcloud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/he0119%2Fnonebot-plugin-wordcloud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/he0119%2Fnonebot-plugin-wordcloud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/he0119%2Fnonebot-plugin-wordcloud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/he0119","download_url":"https://codeload.github.com/he0119/nonebot-plugin-wordcloud/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247208142,"owners_count":20901570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nonebot2","plugin"],"created_at":"2024-10-13T09:45:02.092Z","updated_at":"2025-04-04T16:11:08.137Z","avatar_url":"https://github.com/he0119.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- markdownlint-disable MD033 MD036 MD041 --\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://v2.nonebot.dev/\"\u003e\u003cimg src=\"https://v2.nonebot.dev/logo.png\" width=\"200\" height=\"200\" alt=\"nonebot\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n# NoneBot Plugin WordCloud\n\n_✨ NoneBot 词云插件 ✨_\n\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://raw.githubusercontent.com/he0119/nonebot-plugin-wordcloud/main/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/he0119/nonebot-plugin-wordcloud.svg\" alt=\"license\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://pypi.python.org/pypi/nonebot-plugin-wordcloud\"\u003e\n    \u003cimg src=\"https://img.shields.io/pypi/v/nonebot-plugin-wordcloud.svg\" alt=\"pypi\"\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/python-3.9+-blue.svg\" alt=\"python\"\u003e\n  \u003ca href=\"https://codecov.io/gh/he0119/nonebot-plugin-wordcloud\"\u003e\n    \u003cimg src=\"https://codecov.io/gh/he0119/nonebot-plugin-wordcloud/branch/main/graph/badge.svg?token=e2ECtMI91C\" alt=\"codecov/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://jq.qq.com/?_wv=1027\u0026k=7zQUpiGp\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/QQ%E7%BE%A4-730374631-orange?style=flat-square\" alt=\"QQ Chat Group\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## 安装\n\n```shell\nnb plugin install nonebot-plugin-wordcloud\n```\n\n\u003e **Note**\n\u003e\n\u003e 如需通过命令设置词云形状，则需使用支持 http 请求的驱动器，如 httpx 和 aiohttp。\n\u003e\n\u003e 请参考 [配置驱动器](https://nonebot.dev/docs/advanced/driver#%E9%85%8D%E7%BD%AE%E9%A9%B1%E5%8A%A8%E5%99%A8) 文档进行设置。\n\u003e\n\u003e 例如：\n\u003e\n\u003e DRIVER=~httpx\n\u003e\n\u003e DRIVER=~aiohttp\n\u003e\n\u003e DRIVER=~fastapi+~httpx\n\n## 命令\n\n- 查看帮助\n\n待插件启动完成后，发送 `/词云` 可获取插件使用方法。\n\n- 查看词云\n\n| 功能         | 命令        | 权限   |\n| :----------- | :---------- | :----- |\n| 查看今日词云 | `/今日词云` | 所有人 |\n| 查看昨日词云 | `/昨日词云` | 所有人 |\n| 查看本周词云 | `/本周词云` | 所有人 |\n| 查看上周词云 | `/上周词云` | 所有人 |\n| 查看本月词云 | `/本月词云` | 所有人 |\n| 查看上月词云 | `/上月词云` | 所有人 |\n| 查看年度词云 | `/年度词云` | 所有人 |\n| 查看历史词云 | `/历史词云` | 所有人 |\n\n\u003e 补充： 如果想获取自己的词云，可在上述命令前添加 `我的`，如 `/我的今日词云`。\n\n- 管理词云\n\n| 功能                     | 命令                                                               | 权限                 | 说明                                                                                                                                                                                                                                                                                                                                 |\n| :----------------------- | ------------------------------------------------------------------ | :------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| 设置词云形状             | `/设置词云形状`                                                    | 超级用户/群主/管理员 | 发送一张图片作为当前群词云形状，每个群各自独立                                                                                                                                                                                                                                                                                       |\n| 删除词云形状             | `/删除词云形状`                                                    | 超级用户/群主/管理员 | 删除本群词云形状                                                                                                                                                                                                                                                                                                                     |\n| 设置词云默认形状         | `/设置词云默认形状`                                                | 超级用户             | 发送一张图片作为所有词云的默认形状，每个群都会改变                                                                                                                                                                                                                                                                                   |\n| 删除词云默认形状         | `/删除词云默认形状`                                                | 超级用户             | 删除默认词云形状，继续使用词云默认的矩形                                                                                                                                                                                                                                                                                             |\n| 开启词云每日定时发送     | `/开启词云每日定时发送` 或\u003cbr /\u003e`/开启词云每日定时发送` + `[时间]` | 超级用户/群主/管理员 | 开启本群每日定时发送词云，默认将在每天 `wordcloud_default_schedule_time` 设置的时间发送今日词云，\u003cbr /\u003e如果时间没有包含时区信息，则根据 `wordcloud_timezone` 配置项确定时区。\u003cbr /\u003e时间的格式为 [ISO 8601](https://docs.python.org/zh-cn/3/library/datetime.html#datetime.time.fromisoformat)，例如：`开启词云每日定时发送 23:59:59` |\n| 关闭词云每日定时发送     | `/关闭词云每日定时发送`                                            | 超级用户/群主/管理员 | 关闭本群词云每日定时发送                                                                                                                                                                                                                                                                                                             |\n| 查看词云每日定时发送状态 | `/词云每日定时发送状态`                                            | 超级用户/群主/管理员 | 查看定时发送状态                                                                                                                                                                                                                                                                                                                     |\n\n## 配置项\n\n配置方式：直接在 NoneBot **全局配置文件（.env）** 中添加以下配置项\n\n| 配置项                          | 类型                  | 默认值                 | 说明                                                                                                                                                                                                                                                                                                                                                                              |\n| :------------------------------ | --------------------- | :--------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| wordcloud_width                 | int                   | `1920`                 | 生成图片的宽度                                                                                                                                                                                                                                                                                                                                                                    |\n| wordcloud_height                | int                   | `1200`                 | 生成图片的高度                                                                                                                                                                                                                                                                                                                                                                    |\n| wordcloud_background_color      | str                   | `black`                | 生成图片的背景颜色                                                                                                                                                                                                                                                                                                                                                                |\n| wordcloud_colormap              | Union[str, List[str]] | `viridis`              | 生成图片的字体 [色彩映射表](https://matplotlib.org/stable/tutorials/colors/colormaps.html)（当值为列表时会随机选择其中之一）                                                                                                                                                                                                                                                      |\n| wordcloud_font_path             | str                   | 自带的字体（思源黑体） | 生成图片的字体文件位置                                                                                                                                                                                                                                                                                                                                                            |\n| wordcloud_stopwords_path        | str                   | None                   | 结巴分词的 [停用词表](https://github.com/fxsjy/jieba#%E5%9F%BA%E4%BA%8E-tf-idf-%E7%AE%97%E6%B3%95%E7%9A%84%E5%85%B3%E9%94%AE%E8%AF%8D%E6%8A%BD%E5%8F%96) 位置, 用来屏蔽某些词语\u003cbr /\u003e例如：`\"./wordcloud_extra_dict/stopword.txt\"`\u003cbr /\u003e表示屏蔽 **stopword.txt** 中的词语，\u003cbr /\u003e格式参考 [stop_words.txt](https://github.com/fxsjy/jieba/blob/master/extra_dict/stop_words.txt) |\n| wordcloud_userdict_path         | str                   | None                   | 结巴分词的[自定义词典](https://github.com/fxsjy/jieba#%E8%BD%BD%E5%85%A5%E8%AF%8D%E5%85%B8) 位置                                                                                                                                                                                                                                                                                  |\n| wordcloud_timezone              | str                   | None                   | 用户自定义的 [时区](https://docs.python.org/zh-cn/3/library/zoneinfo.html)，\u003cbr /\u003e留空则使用系统时区，具体数值可参考：[时区列表](https://timezonedb.com/time-zones)，\u003cbr /\u003e例如：`Asia/Shanghai`                                                                                                                                                                                  |\n| wordcloud_default_schedule_time | str                   | `22:00`                | 默认定时发送时间，当开启词云每日定时发送时没有提供具体时间，\u003cbr /\u003e将会在这个时间发送每日词云                                                                                                                                                                                                                                                                                      |\n| wordcloud_options               | `Dict[str, Any]`      | `{}`                   | 向 [WordCloud](https://amueller.github.io/word_cloud/generated/wordcloud.WordCloud.html#wordcloud.WordCloud) 传递的参数。\u003cbr /\u003e拥有最高优先级，将会覆盖以上词云的配置项，\u003cbr /\u003e例如：`{\"background_color\":\"black\",\"max_words\":2000,\"contour_width\":3, \"contour_color\":\"steelblue\"}`                                                                                               |\n| wordcloud_exclude_user_ids      | `Set[str]`            | `set()`                | 排除的用户 ID 列表（全局，不区分平台），\u003cbr /\u003e例如：`[\"123456\",\"456789\"]`                                                                                                                                                                                                                                                                                                         |\n\n## 鸣谢\n\n插件依赖 [nonebot-plugin-chatrecorder](https://github.com/MeetWq/nonebot-plugin-chatrecorder) 提供消息存储。\n\n感谢以下开发者作出的贡献：\n\n\u003ca href=\"https://github.com/he0119/nonebot-plugin-wordcloud/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=he0119/nonebot-plugin-wordcloud\u0026max=1000\" alt=\"contributors\" /\u003e\n\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhe0119%2Fnonebot-plugin-wordcloud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhe0119%2Fnonebot-plugin-wordcloud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhe0119%2Fnonebot-plugin-wordcloud/lists"}