Metadata-Version: 2.4
Name: blog-ai-tool
Version: 0.1.1
Summary: Generate seo content (title, description, keywords) for blog post with AI, support blog framework like Hexo, Hugo, etc.
Author-email: Ryan Yang <code@zair.top>
License: MIT License
        
        Copyright (c) 2024 Ryan Yang
        
        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.
License-File: LICENSE
Requires-Python: >=3.8
Requires-Dist: openai>=1.58.1
Requires-Dist: python-frontmatter>=1.1.0
Requires-Dist: tomli>=2.2.1
Description-Content-Type: text/markdown

# Blog AI tool
Genertate seo content for static blog post with AI, support blog framework like Hexo, Hugo, etc.

## 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.

## Installation

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

## Usage

### Command Line

```bash
# Using default config file
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
```

### Python API

```python
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](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

MIT