nonebot-plugin-shindan


Namenonebot-plugin-shindan JSON
Version 0.4.1 PyPI version JSON
download
home_pagehttps://github.com/noneplugin/nonebot-plugin-shindan
SummaryNonebot2 plugin for using ShindanMaker
upload_time2023-08-10 05:28:13
maintainer
docs_urlNone
authormeetwq
requires_python>=3.8,<4.0
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # nonebot-plugin-shindan

使用 [ShindanMaker](https://shindanmaker.com) 网站的~~无聊~~趣味占卜

利用 playwright 将占卜结果转换为图片发出,因此可以显示图片、图表结果

### 安装

- 使用 nb-cli

```
nb plugin install nonebot_plugin_shindan
```

- 使用 pip

```
pip install nonebot_plugin_shindan
```

插件依赖 [nonebot-plugin-htmlrender](https://github.com/kexue-z/nonebot-plugin-htmlrender) 插件来渲染图片,使用前需要检查 playwright 相关的依赖是否正常安装;同时为确保字体正常渲染,需要系统中存在中文字体


### 使用方式

默认占卜列表及对应的网站id如下:

- 今天是什么少女 (162207)
- 人设生成 (917962)
- 中二称号 (790697)
- 异世界转生 (587874)
- 魔法人生 (940824)
- 抽老婆 (1075116)
- 抽舰娘 (400813)
- 抽高达 (361845)
- 英灵召唤 (595068)
- 卖萌 (360578)

发送 “占卜指令 名字” 即可,如:`人设生成 小Q`

发送 “/占卜列表” 可以查看上述列表;

**超级用户** 可以发送 “/添加占卜 id 指令”、“/删除占卜 id” 增删占卜列表,可以发送 “/设置占卜 id image/text”设置输出形式

超级用户设置方式:[Nonebot 超级用户配置](https://nonebot.dev/docs/appendices/config#superusers)

对于需要登录推特的占卜,可以在 `.env.xxx` 文件中添加 ShindanMaker cookie:

```
shindanmaker_cookie=xxx
```

`cookie` 获取方式:

`F12` 打开开发工具,查看 `shindanmaker.com` 请求的响应头,找形如 `_session=xxx;` 的片段,如:

```
shindanmaker_cookie="_session=xxx;"
```

<div align="left">
  <img src="https://s2.loli.net/2022/06/18/1CqlcTrdVt5vJp6.png" width="500" />
</div>

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/noneplugin/nonebot-plugin-shindan",
    "name": "nonebot-plugin-shindan",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "meetwq",
    "author_email": "meetwq@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/e1/fd/573b2f0b4d7bc7ad0ca67666602a281024c0023bd1cccb707e4092c19efe/nonebot_plugin_shindan-0.4.1.tar.gz",
    "platform": null,
    "description": "# nonebot-plugin-shindan\n\n\u4f7f\u7528 [ShindanMaker](https://shindanmaker.com) \u7f51\u7ad9\u7684~~\u65e0\u804a~~\u8da3\u5473\u5360\u535c\n\n\u5229\u7528 playwright \u5c06\u5360\u535c\u7ed3\u679c\u8f6c\u6362\u4e3a\u56fe\u7247\u53d1\u51fa\uff0c\u56e0\u6b64\u53ef\u4ee5\u663e\u793a\u56fe\u7247\u3001\u56fe\u8868\u7ed3\u679c\n\n### \u5b89\u88c5\n\n- \u4f7f\u7528 nb-cli\n\n```\nnb plugin install nonebot_plugin_shindan\n```\n\n- \u4f7f\u7528 pip\n\n```\npip install nonebot_plugin_shindan\n```\n\n\u63d2\u4ef6\u4f9d\u8d56 [nonebot-plugin-htmlrender](https://github.com/kexue-z/nonebot-plugin-htmlrender) \u63d2\u4ef6\u6765\u6e32\u67d3\u56fe\u7247\uff0c\u4f7f\u7528\u524d\u9700\u8981\u68c0\u67e5 playwright \u76f8\u5173\u7684\u4f9d\u8d56\u662f\u5426\u6b63\u5e38\u5b89\u88c5\uff1b\u540c\u65f6\u4e3a\u786e\u4fdd\u5b57\u4f53\u6b63\u5e38\u6e32\u67d3\uff0c\u9700\u8981\u7cfb\u7edf\u4e2d\u5b58\u5728\u4e2d\u6587\u5b57\u4f53\n\n\n### \u4f7f\u7528\u65b9\u5f0f\n\n\u9ed8\u8ba4\u5360\u535c\u5217\u8868\u53ca\u5bf9\u5e94\u7684\u7f51\u7ad9id\u5982\u4e0b\uff1a\n\n- \u4eca\u5929\u662f\u4ec0\u4e48\u5c11\u5973 (162207)\n- \u4eba\u8bbe\u751f\u6210 (917962)\n- \u4e2d\u4e8c\u79f0\u53f7 (790697)\n- \u5f02\u4e16\u754c\u8f6c\u751f (587874)\n- \u9b54\u6cd5\u4eba\u751f (940824)\n- \u62bd\u8001\u5a46 (1075116)\n- \u62bd\u8230\u5a18 (400813)\n- \u62bd\u9ad8\u8fbe (361845)\n- \u82f1\u7075\u53ec\u5524 (595068)\n- \u5356\u840c (360578)\n\n\u53d1\u9001 \u201c\u5360\u535c\u6307\u4ee4 \u540d\u5b57\u201d \u5373\u53ef\uff0c\u5982\uff1a`\u4eba\u8bbe\u751f\u6210 \u5c0fQ`\n\n\u53d1\u9001 \u201c/\u5360\u535c\u5217\u8868\u201d \u53ef\u4ee5\u67e5\u770b\u4e0a\u8ff0\u5217\u8868\uff1b\n\n**\u8d85\u7ea7\u7528\u6237** \u53ef\u4ee5\u53d1\u9001 \u201c/\u6dfb\u52a0\u5360\u535c id \u6307\u4ee4\u201d\u3001\u201c/\u5220\u9664\u5360\u535c id\u201d \u589e\u5220\u5360\u535c\u5217\u8868\uff0c\u53ef\u4ee5\u53d1\u9001 \u201c/\u8bbe\u7f6e\u5360\u535c id image/text\u201d\u8bbe\u7f6e\u8f93\u51fa\u5f62\u5f0f\n\n\u8d85\u7ea7\u7528\u6237\u8bbe\u7f6e\u65b9\u5f0f\uff1a[Nonebot \u8d85\u7ea7\u7528\u6237\u914d\u7f6e](https://nonebot.dev/docs/appendices/config#superusers)\n\n\u5bf9\u4e8e\u9700\u8981\u767b\u5f55\u63a8\u7279\u7684\u5360\u535c\uff0c\u53ef\u4ee5\u5728 `.env.xxx` \u6587\u4ef6\u4e2d\u6dfb\u52a0 ShindanMaker cookie\uff1a\n\n```\nshindanmaker_cookie=xxx\n```\n\n`cookie` \u83b7\u53d6\u65b9\u5f0f\uff1a\n\n`F12` \u6253\u5f00\u5f00\u53d1\u5de5\u5177\uff0c\u67e5\u770b `shindanmaker.com` \u8bf7\u6c42\u7684\u54cd\u5e94\u5934\uff0c\u627e\u5f62\u5982 `_session=xxx;` \u7684\u7247\u6bb5\uff0c\u5982\uff1a\n\n```\nshindanmaker_cookie=\"_session=xxx;\"\n```\n\n<div align=\"left\">\n  <img src=\"https://s2.loli.net/2022/06/18/1CqlcTrdVt5vJp6.png\" width=\"500\" />\n</div>\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Nonebot2 plugin for using ShindanMaker",
    "version": "0.4.1",
    "project_urls": {
        "Homepage": "https://github.com/noneplugin/nonebot-plugin-shindan",
        "Repository": "https://github.com/noneplugin/nonebot-plugin-shindan"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "94fa641dfae6d882520e32b64f60bf161bf9d00ccecfd420ee77a9a5e93d08ab",
                "md5": "06cdbfe675c57f6a2d77dd703f84b31b",
                "sha256": "77df83ab61a600bcac8a1c1d53fc03efb61b685d9f314d07f29be1c0d12399c0"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_shindan-0.4.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "06cdbfe675c57f6a2d77dd703f84b31b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 252092,
            "upload_time": "2023-08-10T05:28:11",
            "upload_time_iso_8601": "2023-08-10T05:28:11.572891Z",
            "url": "https://files.pythonhosted.org/packages/94/fa/641dfae6d882520e32b64f60bf161bf9d00ccecfd420ee77a9a5e93d08ab/nonebot_plugin_shindan-0.4.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e1fd573b2f0b4d7bc7ad0ca67666602a281024c0023bd1cccb707e4092c19efe",
                "md5": "45694ae2ea0fc48dff0cf83cc08cd898",
                "sha256": "eb9f735cff85ccbf8fc09f414af3eff237a5166ecb15f1b10055335ce9e38c18"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_shindan-0.4.1.tar.gz",
            "has_sig": false,
            "md5_digest": "45694ae2ea0fc48dff0cf83cc08cd898",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 249888,
            "upload_time": "2023-08-10T05:28:13",
            "upload_time_iso_8601": "2023-08-10T05:28:13.475083Z",
            "url": "https://files.pythonhosted.org/packages/e1/fd/573b2f0b4d7bc7ad0ca67666602a281024c0023bd1cccb707e4092c19efe/nonebot_plugin_shindan-0.4.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-10 05:28:13",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "noneplugin",
    "github_project": "nonebot-plugin-shindan",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "nonebot-plugin-shindan"
}
        
Elapsed time: 0.10119s