Skip to main content

🤖 Blog AI tool

PyPI - Version PyPI - License Static Badge Static Badge

🌟 Useful ai tools for blog framework like Hexo, Hugo, etc, as long as you manage your blog with markdown format. 简体中文

✨ 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

pip install blog-ai-tool

🚀 Usage

Command Line

# 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

# Override specific settings
blog-ai-tool --directory content/posts --model gpt-4

Disclaimer: AI may destory your blog, please use git to backup your blog before use. Also, its not recommended to use this tool without reviewing the generated content. Always check the generated content before publishing. The best time to use this tool is right after you have written the blog post, before publishing.

Python API

from blog_ai_tool import HugoBlogProcessor, load_config

# Load configuration
config = load_config("blog-ai-tool.toml")

# Initialize processor
processor = HugoBlogProcessor(
    api_key="your-api-key",
    base_url="https://api.openai.com/v1",
    model="gpt-4",
    language="auto",
    config=config
)

# Process a single file
processor.process_markdown("path/to/post.md")

📚 Configuration

Download the example config file 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.

🤝 Development

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

📝 License

MIT

Release files for blog-ai-tool 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for blog-ai-tool 0.1.2
File Size Uploaded
blog_ai_tool-0.1.2.tar.gz 21.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for blog-ai-tool 0.1.2
File Interpreter ABI Platform
blog_ai_tool-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 30.6 kB

Release files / blog_ai_tool-0.1.2.tar.gz

Download URL blog_ai_tool-0.1.2.tar.gz
Size 21.8 kB
Tags Source
SHA-256 checksum
How to use checksums
34d90dd8cb56b335a08d4a2d15ff563de8cfe12a45e6e1670e8aff78c90efb68
BLAKE2b-256 checksum
How to use checksums
f07ee3d3da84f631c302aff9d8ffdd6868d28dc12a9fd0928cfb48cf583473d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.8

Release files / blog_ai_tool-0.1.2-py3-none-any.whl

Download URL blog_ai_tool-0.1.2-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d6df27a7076f82e1eefbd780fba5d4ffed490c71f557919d5b41bf1a7410f5df
BLAKE2b-256 checksum
How to use checksums
4d6c10f330e65d1af29e1f645322a151ba4e2e9418d52b705460bb8e48cce22d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.8

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page