Skip to content

Commit

Permalink
docs: Revise project description and enhance README with new features
Browse files Browse the repository at this point in the history
- Updated project description in pyproject.toml to reflect broader AI capabilities including SEO, summaries, and translations.
- Added keywords to pyproject.toml for better discoverability.
- Enhanced README with new feature highlights, installation instructions, and usage examples.
- Included badges for version and license in README for improved visibility.
- Added project URLs for homepage and repository in pyproject.toml.
  • Loading branch information
Ryaang committed Dec 19, 2024
1 parent f418094 commit d82fb39
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 12 deletions.
71 changes: 71 additions & 0 deletions README-Zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# 🤖 博客 AI 工具
[![PyPI - Version](https://img.shields.io/pypi/v/blog-ai-tool)](https://pypi.org/project/blog-ai-tool/) [![PyPI - License](https://img.shields.io/pypi/l/blog-ai-tool)](https://pypi.org/project/blog-ai-tool/) [![Static Badge](https://img.shields.io/badge/%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87-8A2BE2)](README-Zh.md) [![Static Badge](https://img.shields.io/badge/English-blue)](README.md)

🌟 适用于 Hexo、Hugo 等博客框架的 AI 工具,只要你使用 markdown 格式管理博客即可使用。[English](README.md)

## ✨ 特性
- 🎯 为 markdown 格式的博客文章生成 SEO 内容(标题、**描述**、关键词)
- 📝 为博客文章生成 AI 摘要
- 🌍 将博客文章翻译成多种语言
- 🛠️ 支持 Hexo、Hugo 等博客框架
- 🌐 支持多语言
- 🧠 支持 OpenAI、Qwen、Llama 等多种 AI 模型,只要该模型提供兼容 OpenAI 的 API 即可

## 🛠️ 安装

```bash
pip install blog-ai-tool
```

## 🚀 使用方法

### 命令行

```bash
# 使用默认配置文件
blog-ai-tool

# 如果上述命令不起作用,请尝试使用以下命令
python -m blog_ai_tool

# 使用自定义配置文件
blog-ai-tool --config my-config.toml

# 覆盖特定设置
blog-ai-tool --directory content/posts --model gpt-4
```

免责声明:AI 可能会破坏你的博客,使用前请使用 git **备份**你的博客。同时,不建议在**未审核**生成内容的情况下使用此工具。发布前务必检查生成的内容。使用此工具的最佳时机是在你刚写完博客文章后、发布前。

### Python API

```python
from blog_ai_tool import HugoBlogProcessor, load_config

# 加载配置
config = load_config("blog-ai-tool.toml")

# 初始化处理器
processor = HugoBlogProcessor(
api_key="your-api-key",
base_url="https://api.openai.com/v1",
model="gpt-4",
language="auto",
config=config
)

# 处理单个文件
processor.process_markdown("path/to/post.md")
```

## 📚 配置

下载[示例配置文件](blog-ai-tool.toml)并根据需要修改。将配置文件放在博客根目录(与博客配置文件同级),然后运行命令。

## 🤝 开发

我们诚挚欢迎对这个项目的任何贡献。请随时提交你的想法和建议。

## 📝 许可证

MIT
33 changes: 22 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,33 @@
# Blog AI tool
Genertate seo content for static blog post with AI, support blog framework like Hexo, Hugo, etc.
# 🤖 Blog AI tool
[![PyPI - Version](https://img.shields.io/pypi/v/blog-ai-tool)](https://pypi.org/project/blog-ai-tool/) [![PyPI - License](https://img.shields.io/pypi/l/blog-ai-tool)](https://pypi.org/project/blog-ai-tool/) [![Static Badge](https://img.shields.io/badge/%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87-8A2BE2)](README-Zh.md) [![Static Badge](https://img.shields.io/badge/English-blue)](README.md)

## Features
- Generate seo content (title, **description**, keywords) for blog posts in markdown format
- Support blog framework like Hexo, Hugo, etc.
- Support multiple language
- Support multiple AI model like OpenAI, Qwen, Llama, etc. As long as the model provides openai-compatible API.
🌟 Useful ai tools for blog framework like Hexo, Hugo, etc, as long as you manage your blog with markdown format. [简体中文](README-Zh.md)

## Installation
## ✨ Features
- 🎯 Generate seo content (title, **description**, keywords) for blog posts in markdown format
- 📝 Generate ai summary for blog posts
- 🌍 Translate blog posts to multiple languages
- 🛠️ Support blog framework like Hexo, Hugo, etc.
- 🌐 Support multiple language
- 🧠 Support multiple AI model like OpenAI, Qwen, Llama, etc. As long as the model provides openai-compatible API.

## 🛠️ Installation

```bash
pip install blog-ai-tool
```

## Usage
## 🚀 Usage

### Command Line

```bash
# Using default config file
blog-ai-tool

# if the above command is not working, try to use this following command instead
python -m blog_ai_tool

# Using custom config file
blog-ai-tool --config my-config.toml

Expand Down Expand Up @@ -51,10 +58,14 @@ processor = HugoBlogProcessor(
processor.process_markdown("path/to/post.md")
```

## Configuration
## 📚 Configuration

Download the [example config file](blog-ai-tool.toml) and modify it to your needs. Put the config file in your blog root directory (the same level as as your blog config file), then run the command.

## License
## 🤝 Development

We sincerely welcome any contributions to this project. Please feel free to submit your ideas and suggestions.

## 📝 License

MIT
13 changes: 12 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,20 @@ build-backend = "hatchling.build"
[project]
name = "blog-ai-tool"
version = "0.1.2"
description = "Generate seo content (title, description, keywords) for blog post with AI, support blog framework like Hexo, Hugo, etc."
description = "Useful ai tools for markdown blog posts, support ai seo, ai summary, ai translation, etc. Compatible with blog framework like Hexo, Hugo, etc."
readme = "README.md"
requires-python = ">=3.8"
license = { file = "LICENSE" }
authors = [
{ name = "Ryan Yang", email = "[email protected]" }
]
keywords = [
"blog",
"seo",
"ai",
"hugo",
"hexo"
]
dependencies = [
"openai>=1.58.1",
"python-frontmatter>=1.1.0",
Expand All @@ -23,3 +30,7 @@ blog-ai-tool = "blog-ai-tool.main:main"

[tool.hatch.build.targets.wheel]
packages = ["blog-ai-tool"]

[project.urls]
homepage = "https://github.com/ryanng/blog-ai-tool"
repository = "https://github.com/ryanng/blog-ai-tool"

0 comments on commit d82fb39

Please sign in to comment.