Name | mkdocs-ai-summary JSON |
Version |
0.2.6
JSON |
| download |
home_page | None |
Summary | A mkdocs plugin to generage summary with the help of AI. |
upload_time | 2024-12-27 17:48:35 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | MIT License Copyright (c) 2024 Yang Zhang <mail@yangzhang.site> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
mkdocs
ai
blog
chatgpt
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# mkdocs-ai-summary
[![PyPI - Version](https://img.shields.io/pypi/v/mkdocs-ai-summary)](https://pypi.org/project/mkdocs-ai-summary/)
![PyPI - Implementation](https://img.shields.io/pypi/implementation/mkdocs-ai-summary)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mkdocs-ai-summary)
Generage an **ai-summary** and insert into page content:
![](assets/2024-05-23-04-35-01.png)
## Live Demo
Minimal demo(raw mkdocs): [AIboy996/mkdocs-ai-summary-minimal-example](https://aiboy996.github.io/mkdocs-ai-summary-minimal-example/)
Another demo(mkdocs-material theme): [AIboy996/mkdocs-ai-summary](https://aiboy996.github.io/mkdocs-ai-summary)
Real world demo(my homepage): [yangzhang.site](https://yangzhang.site)
> I wrote these codes for my blog site at first. Now it's open for anyone who may need AI to summarize his words.
## Installation
You should install the package with pip:
```
pip install mkdocs-ai-summary[chatgpt]
# this will install `openai` additionally
```
or
```
pip install mkdocs-ai-summary[tongyi]
# this will install `dashscope` additionally
```
> [!WARNING]
>
> Only support [ChatGPT](https://chat.openai.com/) and [tongyi ai](https://tongyi.aliyun.com/) for now.
>
> To use **ChatGPT(default)**, you should set a Environmental Variable for **api key**:
> ```bash
> export OPENAI_API_KEY='sk-xxxxxxx'
> ```
> [how to get an OPENAI_API_KEY?](https://platform.openai.com/docs/quickstart)
>
> To use **tongyi ai**, you should set a Environmental Variable for **api key**:
> ```bash
> export DASHSCOPE_API_KEY='sk-xxxxxxx'
> ```
> [how to get an DASHSCOPE_API_KEY?](https://dashscope.console.aliyun.com/)
> [!TIP]
>
> Furthermore you can include the [ai-summary.css](./docs/ai-summary.css) as `extra_css` in the config file.
>
> This is optional, and iff you are using `mkdocs-material` theme this can work.
## Configuration
All parameters:
name|type|default value| note
--|--|--|--
api|str|chatgpt| only support chatgpt or tongyi
model|str|gpt-3.5-turbo | -
ignore_code|bool|true| ignore code block in markdown
cache|bool|true| -
cache_dir|str|"./"| -
prompt|str|"Please help me summarize the following content into an abstract within 200 words: "| -
### Example Configuration For ChatGPT Summary
Setup `mkdocs.yml` like this:
```yml
site_name: mkdocs-ai-summary
theme:
name: material
plugins:
# use default config
- ai-summary
- tags
markdown_extensions:
- admonition
- pymdownx.details
- pymdownx.superfences
- pymdownx.tabbed:
alternate_style: true
extra_css:
- ai-summary.css
```
Then for the page you want an ai-summary, just add a meta tag:
```markdown
---
include:
- ai-summary
---
# title
hello ai summary.
```
### Example Configuration For tongyi ai Summary
or you can use **tongyi ai** by setting:
```yml
plugins:
- ai-summary:
api: "tongyi"
model: "qwen-turbo"
ignore_code: true
cache: true
cache_dir: "./"
prompt: "Please help me summarize the following content into an abstract within 200 words: "
```
### Setup ai-summary for specific page
You can also setup ai summary for each page separately:
```markdown
---
include:
- ai-summary
ai-summary-config:
api: "tongyi"
model: "qwen-turbo"
prompt: "Say anything, 200 words."
---
# title
hello ai summary.
```
all config options are available. **Page configuration will override unified configuration.**
## About Cache
Don't worry about duplicate api calls, we've made the cache function so that if you've done an ai-summary before and the content hasn't changed it will use the cache.
Enjoy it.
## SPECIAL THANKS TO
- [mkdocs](https://www.mkdocs.org/)
- [mkdocs-material](https://squidfunk.github.io/mkdocs-material/)
Raw data
{
"_id": null,
"home_page": null,
"name": "mkdocs-ai-summary",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "mkdocs, AI, blog, chatgpt",
"author": null,
"author_email": "Yang Zhang <mail@yangzhang.site>",
"download_url": "https://files.pythonhosted.org/packages/1c/2c/35b29d7af15b4a770f8db7b778d311479232995c2509e842757c66cfa9f7/mkdocs_ai_summary-0.2.6.tar.gz",
"platform": null,
"description": "# mkdocs-ai-summary\n\n[![PyPI - Version](https://img.shields.io/pypi/v/mkdocs-ai-summary)](https://pypi.org/project/mkdocs-ai-summary/)\n![PyPI - Implementation](https://img.shields.io/pypi/implementation/mkdocs-ai-summary)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mkdocs-ai-summary)\n\nGenerage an **ai-summary** and insert into page content:\n![](assets/2024-05-23-04-35-01.png)\n\n## Live Demo\n\nMinimal demo(raw mkdocs): [AIboy996/mkdocs-ai-summary-minimal-example](https://aiboy996.github.io/mkdocs-ai-summary-minimal-example/)\n\nAnother demo(mkdocs-material theme): [AIboy996/mkdocs-ai-summary](https://aiboy996.github.io/mkdocs-ai-summary)\n\nReal world demo(my homepage): [yangzhang.site](https://yangzhang.site)\n\n> I wrote these codes for my blog site at first. Now it's open for anyone who may need AI to summarize his words.\n\n## Installation\n\nYou should install the package with pip:\n```\npip install mkdocs-ai-summary[chatgpt]\n# this will install `openai` additionally\n```\nor\n```\npip install mkdocs-ai-summary[tongyi]\n# this will install `dashscope` additionally\n```\n\n> [!WARNING]\n> \n> Only support [ChatGPT](https://chat.openai.com/) and [tongyi ai](https://tongyi.aliyun.com/) for now.\n> \n> To use **ChatGPT(default)**, you should set a Environmental Variable for **api key**:\n> ```bash\n> export OPENAI_API_KEY='sk-xxxxxxx'\n> ```\n> [how to get an OPENAI_API_KEY?](https://platform.openai.com/docs/quickstart)\n> \n> To use **tongyi ai**, you should set a Environmental Variable for **api key**:\n> ```bash\n> export DASHSCOPE_API_KEY='sk-xxxxxxx'\n> ```\n> [how to get an DASHSCOPE_API_KEY?](https://dashscope.console.aliyun.com/)\n\n> [!TIP] \n> \n> Furthermore you can include the [ai-summary.css](./docs/ai-summary.css) as `extra_css` in the config file.\n> \n> This is optional, and iff you are using `mkdocs-material` theme this can work.\n\n## Configuration\n\nAll parameters:\n\nname|type|default value| note\n--|--|--|--\napi|str|chatgpt| only support chatgpt or tongyi\nmodel|str|gpt-3.5-turbo | -\nignore_code|bool|true| ignore code block in markdown\ncache|bool|true| -\ncache_dir|str|\"./\"| -\nprompt|str|\"Please help me summarize the following content into an abstract within 200 words: \"| -\n\n\n### Example Configuration For ChatGPT Summary\n\nSetup `mkdocs.yml` like this:\n\n```yml\nsite_name: mkdocs-ai-summary\ntheme:\n name: material\n\nplugins:\n # use default config\n - ai-summary\n - tags\n\nmarkdown_extensions:\n - admonition\n - pymdownx.details\n - pymdownx.superfences\n - pymdownx.tabbed:\n alternate_style: true \nextra_css:\n - ai-summary.css\n```\n\nThen for the page you want an ai-summary, just add a meta tag:\n```markdown\n---\ninclude:\n- ai-summary\n---\n\n# title\n\nhello ai summary.\n```\n\n### Example Configuration For tongyi ai Summary\nor you can use **tongyi ai** by setting:\n```yml\nplugins:\n - ai-summary:\n api: \"tongyi\"\n model: \"qwen-turbo\"\n ignore_code: true\n cache: true\n cache_dir: \"./\"\n prompt: \"Please help me summarize the following content into an abstract within 200 words: \"\n```\n\n### Setup ai-summary for specific page\n\nYou can also setup ai summary for each page separately:\n\n```markdown\n---\ninclude:\n- ai-summary\nai-summary-config:\n api: \"tongyi\"\n model: \"qwen-turbo\"\n prompt: \"Say anything, 200 words.\"\n---\n\n# title\n\nhello ai summary.\n```\n\nall config options are available. **Page configuration will override unified configuration.**\n\n## About Cache\n\nDon't worry about duplicate api calls, we've made the cache function so that if you've done an ai-summary before and the content hasn't changed it will use the cache.\n\nEnjoy it.\n\n## SPECIAL THANKS TO\n\n- [mkdocs](https://www.mkdocs.org/)\n- [mkdocs-material](https://squidfunk.github.io/mkdocs-material/)\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 Yang Zhang <mail@yangzhang.site> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "A mkdocs plugin to generage summary with the help of AI.",
"version": "0.2.6",
"project_urls": {
"Homepage": "https://github.com/AIboy996/mkdocs-ai-summary"
},
"split_keywords": [
"mkdocs",
" ai",
" blog",
" chatgpt"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "90c273ec772dd1caee8437005c007a53823714d52940910939ec5292a2410477",
"md5": "d6fd6f728d0d475fa26d5f29349a34e1",
"sha256": "87e1c7c5ab0646c96114b0d7226bcdd8be03563e6e1a983596276988a30caa7d"
},
"downloads": -1,
"filename": "mkdocs_ai_summary-0.2.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d6fd6f728d0d475fa26d5f29349a34e1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 8692,
"upload_time": "2024-12-27T17:48:33",
"upload_time_iso_8601": "2024-12-27T17:48:33.436748Z",
"url": "https://files.pythonhosted.org/packages/90/c2/73ec772dd1caee8437005c007a53823714d52940910939ec5292a2410477/mkdocs_ai_summary-0.2.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1c2c35b29d7af15b4a770f8db7b778d311479232995c2509e842757c66cfa9f7",
"md5": "1269dcb3cd7f34ad2093b7199a2286aa",
"sha256": "1a016a88a4932ee647f30149a7c9d0da507e4584fc25205154f857a9ba9c4ca5"
},
"downloads": -1,
"filename": "mkdocs_ai_summary-0.2.6.tar.gz",
"has_sig": false,
"md5_digest": "1269dcb3cd7f34ad2093b7199a2286aa",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 6437,
"upload_time": "2024-12-27T17:48:35",
"upload_time_iso_8601": "2024-12-27T17:48:35.510206Z",
"url": "https://files.pythonhosted.org/packages/1c/2c/35b29d7af15b4a770f8db7b778d311479232995c2509e842757c66cfa9f7/mkdocs_ai_summary-0.2.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-27 17:48:35",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "AIboy996",
"github_project": "mkdocs-ai-summary",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "mkdocs-ai-summary"
}