Skip to main content

An enterprise-grade CLI utility to generate structured blog posts using local Ollama and push them to GitHub JSON schemas.

Project description

Markdown

ai-blog-publisher

PyPI version Python Versions License: MIT

ai-blog-publisher (aiblog) is an enterprise-grade, resilient CLI utility that leverages local Ollama LLMs to generate structured blog posts and safely commit them to remote JSON schema files on GitHub.


Features

  • LLM Resilience & JSON Repair: Strips markdown code fences and repairs malformed model outputs automatically.
  • Service Health-Check: Validates that the local Ollama daemon and selected model are online before execution.
  • Exponential Backoff Retries: Handles transient network failures during GitHub API interactions.
  • Dry-Run Safety Mode: Test generation locally without committing to remote repositories (--dry-run).

Installation

pip install --editable .
Configuration
Set your environment variables:

Bash
export GITHUB_TOKEN="your_github_token"
export GITHUB_REPO="your-username/your-repo-name"
Usage
Bash
# Standard interactive run
aiblog

# Test generation without pushing to GitHub
aiblog --dry-run

# Use custom model or file path
aiblog --model "llama3" --path "_data/posts.json"

License
Distributed under the MIT License. See LICENSE for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ai_blog_publisher-0.2.0.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ai_blog_publisher-0.2.0-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file ai_blog_publisher-0.2.0.tar.gz.

File metadata

  • Download URL: ai_blog_publisher-0.2.0.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for ai_blog_publisher-0.2.0.tar.gz
Algorithm Hash digest
SHA256 abcd7300516578eb42ad323e820bfc80dc6e8a55364825f9092a3d639e7d9e7a
MD5 e1135c305ed379f457fc03426d492abe
BLAKE2b-256 5999ab20018795b5503ed2782f52352f22be9b32cde3e3c01a7093abb6b5f3bd

See more details on using hashes here.

File details

Details for the file ai_blog_publisher-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ai_blog_publisher-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a9d43dcdb6624c274ee91ea872425567ed828fc137bd854267530b18933a54fe
MD5 ee22d3452bb2e2f29bf2d9e7ebe95ade
BLAKE2b-256 b91ed857c2f7dbcf8bfb4c1f2e86421ecb21427199e8a29324ad87aa2659a116

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page