{"id":23910740,"url":"https://github.com/tomorinao-www/nonebot-plugin-anime-trace","last_synced_at":"2025-06-13T04:32:22.443Z","repository":{"id":189084269,"uuid":"680010162","full_name":"tomorinao-www/nonebot-plugin-anime-trace","owner":"tomorinao-www","description":"nonebot2插件，识别动漫和galgame角色","archived":false,"fork":false,"pushed_at":"2025-04-19T13:49:54.000Z","size":755,"stargazers_count":41,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-26T10:13:43.515Z","etag":null,"topics":["acg","ai","nonebot-plugin"],"latest_commit_sha":null,"homepage":"","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/tomorinao-www.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"zenodo":null}},"created_at":"2023-08-18T06:15:01.000Z","updated_at":"2025-04-19T13:49:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"9d0fa8ed-4c77-43c7-9400-0eec5b3b5cfd","html_url":"https://github.com/tomorinao-www/nonebot-plugin-anime-trace","commit_stats":null,"previous_names":["tomorinao-www/nonebot-plugin-anime-trace"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/tomorinao-www/nonebot-plugin-anime-trace","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomorinao-www%2Fnonebot-plugin-anime-trace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomorinao-www%2Fnonebot-plugin-anime-trace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomorinao-www%2Fnonebot-plugin-anime-trace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomorinao-www%2Fnonebot-plugin-anime-trace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomorinao-www","download_url":"https://codeload.github.com/tomorinao-www/nonebot-plugin-anime-trace/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomorinao-www%2Fnonebot-plugin-anime-trace/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259580811,"owners_count":22879731,"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":["acg","ai","nonebot-plugin"],"created_at":"2025-01-05T07:19:41.503Z","updated_at":"2025-06-13T04:32:22.436Z","avatar_url":"https://github.com/tomorinao-www.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://v2.nonebot.dev/store\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/A-kirami/nonebot-plugin-template/refs/heads/resources/nbp_logo.png\" width=\"180\" height=\"180\" alt=\"NoneBotPluginLogo\"\u003e\u003c/a\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://v2.nonebot.dev/store\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/A-kirami/nonebot-plugin-template/88c60174f63914be62251ffc192cb8b408bbc845/NoneBotPlugin.svg\" width=\"240\" alt=\"NoneBotPluginText\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n# nonebot-plugin-anime-trace\n\n_✨ 通过 ai.animedb.cn 的 api 识别动漫、galgame 角色 ✨_\n\n\u003ca href=\"https://github.com/tomorinao-www/nonebot-plugin-anime-trace/blob/main/LICENSE\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/license/tomorinao-www/nonebot-plugin-anime-trace.svg\" alt=\"License\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://pypi.python.org/pypi/nonebot-plugin-anime-trace\"\u003e\n  \u003cimg src=\"https://img.shields.io/pypi/v/nonebot-plugin-anime-trace.svg?style=flat\u0026logo=pypi\u0026logoColor=fff\u0026labelColor=3775A9\" alt=\"pypi\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://pypi.python.org/pypi/nonebot-plugin-anime-trace\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Python-3.10+-f09?style=flat\u0026logo=Python\u0026logoColor=fc5\u0026labelColor=3776AB\" alt=\"Python\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://github.com/tomorinao-www/nonebot-plugin-anime-trace\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/stars/tomorinao-www/nonebot-plugin-anime-trace.svg?style=social\" alt=\"stars\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://github.com/tomorinao-www/nonebot-plugin-anime-trace/forks\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/forks/tomorinao-www/nonebot-plugin-anime-trace.svg?style=social\" alt=\"forks\"\u003e\n\u003c/a\u003e\n\u003c/div\u003e\n\n## 最新情报\n\n网站 api 更新，已适配。 2025/02/20\n\n前两天网站抽风，现已恢复正常。2023/08/25\n\n## 💿 安装\n\n\u003cdetails open\u003e\n\u003csummary\u003e使用 nb-cli 安装\u003c/summary\u003e\n在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装\n\n    nb plugin install nonebot-plugin-anime-trace\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e使用包管理器安装\u003c/summary\u003e\n在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令\n\n    pip install nonebot-plugin-anime-trace\n\n打开 nonebot2 项目根目录下的 `pyproject.toml` 文件, 在 `[tool.nonebot]` 部分追加写入\n\n    plugins = [\"nonebot-plugin-anime-trace\"]\n\n\u003c/details\u003e\n\n## 🎉 使用\n\n默认配置下\n\n命令: {#} {识别|角色|人物|} [gal|动漫]\n\n说明：命令符不是命令头，只要包含命令符和命令关键字就会触发响应，例如“foo 识别 foo#foo”也可以触发\n\n大括号内{}为必要关键字, 中括号内[]为可选参数, 默认使用动漫模型\n\n附带一张图片、或回复一张图片、或再发送一张图片\n\n可以自定义命令符、命令关键字\n\n\u003cdetails open\u003e\n\u003csummary\u003e\n示例:\n\u003c/summary\u003e\n\n| ![image](./img/use_ex01.jpg) | ![image](./img/use_ex02.jpg) |\n| ---------------------------- | ---------------------------- |\n\n| ![image](./img/use_ex03.jpg) | ![image](./img/use_ex04.jpg) |\n| ---------------------------- | ---------------------------- |\n\n\u003c/details\u003e\n\n## ⚙️ 配置\n\n如果需要自定义配置，请在 nonebot2 项目的`.env`文件中添加配置\n\n```py\n\nclass Config(BaseModel):\n    # 是否合并转发消息\n    animetrace_send_forward: bool = True\n    # 是否检测ai图\n    animetrace_ai_detect: bool = True\n    # 是否拆分每个识别结果:角色,作品,链接\n    animetrace_extract: bool = True\n    # 是否发送萌娘百科链接\n    animetrace_moegirl: bool = False\n    # 自定义搜索链接, 设置为空\"\"则取消\n    animetrace_url: str = \"zh.wikipedia.org/w/index.php?search=\"\n    # 命令符\n    animetrace_cmd: str = \"#\"\n    # 命令关键字\n    animetrace_keyword: set[str] = {\"识别\", \"角色\", \"人物\"}\n    # 响应优先级\n    animetrace_priority: int = 10\n    # 动漫模型\n    animetrace_model_anime: str = \"anime_model_lovelive\"\n    # galgame模型\n    animetrace_model_gal: str = \"full_game_model_kira\"\n    # 一个角色最多返回几个识别结果\n    animetrace_max_num: int = 3\n    # bot昵称\n    nickname: list[str] = [\"anime trace\"]\n```\n\n动漫模型和 galgame 模型请前往 [ai.animedb.cn](https://ai.animedb.cn)查看\n\n## 常见问题 Q\u0026A\n\n### 没有识别到任何角色\n\n网站没有识别到该图中的角色\n\n### 出错啦~可能是图里角色太多了 content:{code:-1}\n\n网站处理图片出错，可能是图中角色过多、或者网站后端挂了，可以尝试裁剪图片\n\n### 识别失败，换张图片试试吧~\u003cResponse [504 Gateway Time-out]\u003e\n\n网站接收图片出错，可能是图中角色过多、或者网站后端挂了，可以尝试裁剪图片\n\n### 其他\n\n请先去[ai.animedb.cn](https://ai.animedb.cn)尝试能否识别，若能识别，联系我更新；若不能识别，等待站长修复\n\n## TODO\n\n- [x] 增加 ai 绘图鉴别\n- [ ] 添加结果图片对比\n- [ ] 跨平台兼容\n\n## 跨平台兼容\n\n### 合并转发消息\n\n\u003e send_group_forward_msg\n\u003e\n\u003e | 字段     | 类型       | 说明           |\n\u003e | -------- | ---------- | -------------- |\n\u003e | group_id | uint       | 群号           |\n\u003e | messages | List[Node] | 自定义转发消息 |\n\n\u003e Node\n\u003e\n\u003e | 字段    | 类型                                | 说明     |\n\u003e | ------- | ----------------------------------- | -------- |\n\u003e | uin     | string                              | QQ 号    |\n\u003e | name    | string                              | 昵称     |\n\u003e | content | List[OneBotSegment] / OneBotSegment | 消息内容 |\n\n\u003e send_private_forward_msg\n\u003e\n\u003e | 字段     | 类型       | 说明           |\n\u003e | -------- | ---------- | -------------- |\n\u003e | user_id  | uint       | 好友 QQ 号     |\n\u003e | messages | List[Node] | 自定义转发消息 |\n\n## 赞助\n\n\u003e 救救 developer，孩子吃不起饭了\n\u003e | ![donate-wx](./img/donate-wx.jpg) | ![donate-wx](./img/donate-alipay.jpg) |\n\u003e | --------------------------------- | ------------------------------------- |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomorinao-www%2Fnonebot-plugin-anime-trace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomorinao-www%2Fnonebot-plugin-anime-trace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomorinao-www%2Fnonebot-plugin-anime-trace/lists"}