mirror of
https://github.com/d-k-patel/ai-ffmpeg-cli.git
synced 2025-10-09 13:42:56 +03:00
docs: add MkDocs site and Makefile docs target; build: add PyPI guards; bump version to 0.1.2
This commit is contained in:
21
Makefile
21
Makefile
@@ -20,7 +20,7 @@ YELLOW=\033[1;33m
|
||||
RED=\033[0;31m
|
||||
NC=\033[0m # No Color
|
||||
|
||||
.PHONY: help setup install test lint format clean run demo build publish release docker docs
|
||||
.PHONY: help setup install test lint format clean run demo build publish release docker docs pypi-guard testpypi-guard
|
||||
|
||||
# Default target
|
||||
help:
|
||||
@@ -142,14 +142,14 @@ build: clean
|
||||
$(BUILD)
|
||||
@echo "$(GREEN)Build complete! Check dist/ directory.$(NC)"
|
||||
|
||||
test-pub: build
|
||||
test-pub: build testpypi-guard
|
||||
@echo "$(GREEN)Publishing to TestPyPI...$(NC)"
|
||||
$(PIP) install --upgrade twine
|
||||
$(TWINE) upload --repository testpypi dist/*
|
||||
@echo "$(GREEN)Published to TestPyPI!$(NC)"
|
||||
@echo "Test with: pip install -i https://test.pypi.org/simple/ ai-ffmpeg-cli"
|
||||
|
||||
publish: build
|
||||
publish: build pypi-guard
|
||||
@echo "$(YELLOW)Publishing to PyPI (PRODUCTION)...$(NC)"
|
||||
@echo "$(RED)This will publish to the real PyPI! Press Enter to continue or Ctrl+C to cancel.$(NC)"
|
||||
@read
|
||||
@@ -208,11 +208,22 @@ release: version-check
|
||||
|
||||
@echo "$(GREEN)Release $(VERSION) complete! 🚀$(NC)"
|
||||
|
||||
# Guards to prevent publishing an existing version
|
||||
pypi-guard:
|
||||
@echo "$(YELLOW)Checking PyPI for existing version...$(NC)"
|
||||
@$(PY) -c "import json,sys,re,urllib.request; t=open('pyproject.toml',encoding='utf-8').read(); m=re.search(r'^version\\s*=\\s*\\\"([^\\\"]+)\\\"', t, re.M); v=m.group(1) if m else None; data=json.load(urllib.request.urlopen('https://pypi.org/pypi/ai-ffmpeg-cli/json', timeout=10)); exists=(v in data.get('releases', {})); (print('Failed to determine version from pyproject.toml', file=sys.stderr) or sys.exit(1)) if not v else None; (print(f'Version {v} already exists on PyPI. Bump the version before publishing.', file=sys.stderr) or sys.exit(2)) if exists else print(f'Version {v} not on PyPI. Safe to publish.')"
|
||||
|
||||
testpypi-guard:
|
||||
@echo "$(YELLOW)Checking TestPyPI for existing version...$(NC)"
|
||||
@$(PY) -c "import json,sys,re,urllib.request; t=open('pyproject.toml',encoding='utf-8').read(); m=re.search(r'^version\\s*=\\s*\\\"([^\\\"]+)\\\"', t, re.M); v=m.group(1) if m else None; data=json.load(urllib.request.urlopen('https://test.pypi.org/pypi/ai-ffmpeg-cli/json', timeout=10)); exists=(v in data.get('releases', {})); (print('Failed to determine version from pyproject.toml', file=sys.stderr) or sys.exit(1)) if not v else None; (print(f'Version {v} already exists on TestPyPI. Bump the version or use a pre-release tag before test publish.', file=sys.stderr) or sys.exit(2)) if exists else print(f'Version {v} not on TestPyPI. Safe to test publish.')"
|
||||
|
||||
# Documentation
|
||||
docs:
|
||||
@echo "$(GREEN)Generating documentation...$(NC)"
|
||||
$(PIP) install mkdocs mkdocs-material
|
||||
mkdocs serve
|
||||
# Ensure docs dependencies are installed
|
||||
$(PIP) install -e .[docs]
|
||||
@echo "$(GREEN)Starting MkDocs server...$(NC)"
|
||||
$(VENV)/bin/mkdocs serve
|
||||
@echo "$(GREEN)Documentation served at http://127.0.0.1:8000$(NC)"
|
||||
|
||||
# Docker
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
[](https://badge.fury.io/py/ai-ffmpeg-cli)
|
||||
[](https://www.python.org/downloads/)
|
||||
[](https://opensource.org/licenses/MIT)
|
||||
[](https://pepy.tech/project/ai-ffmpeg-cli)
|
||||
|
||||
> **Stop Googling ffmpeg commands. Just describe what you want.**
|
||||
|
||||
|
||||
14
docs/development.md
Normal file
14
docs/development.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# Development
|
||||
|
||||
```bash
|
||||
git clone https://github.com/d-k-patel/ai-ffmpeg-cli
|
||||
cd ai-ffmpeg-cli
|
||||
make setup
|
||||
make test
|
||||
```
|
||||
|
||||
Serve docs locally:
|
||||
|
||||
```bash
|
||||
make docs
|
||||
```
|
||||
11
docs/index.md
Normal file
11
docs/index.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# aiclip
|
||||
|
||||
Turn natural language into safe, previewable `ffmpeg` commands.
|
||||
|
||||
```bash
|
||||
pip install ai-ffmpeg-cli
|
||||
export OPENAI_API_KEY=...
|
||||
aiclip "convert input.mp4 to 720p"
|
||||
```
|
||||
|
||||
See Usage for examples.
|
||||
12
docs/usage.md
Normal file
12
docs/usage.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# Usage
|
||||
|
||||
```bash
|
||||
aiclip "convert input.mov to mp4 with h264 and aac"
|
||||
aiclip "trim first 30 seconds from video.mp4"
|
||||
aiclip --dry-run "compress large-video.mp4"
|
||||
```
|
||||
|
||||
Options:
|
||||
- `--yes`: skip confirmation
|
||||
- `--dry-run`: preview only
|
||||
- `--model gpt-4o-mini`: pick model
|
||||
22
mkdocs.yml
Normal file
22
mkdocs.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
site_name: aiclip
|
||||
site_description: AI-powered CLI that translates natural language to safe ffmpeg commands
|
||||
repo_url: https://github.com/d-k-patel/ai-ffmpeg-cli
|
||||
site_url: https://d-k-patel.github.io/ai-ffmpeg-cli/
|
||||
theme:
|
||||
name: material
|
||||
features:
|
||||
- navigation.tabs
|
||||
- navigation.sections
|
||||
- content.code.copy
|
||||
markdown_extensions:
|
||||
- admonition
|
||||
- codehilite
|
||||
- toc:
|
||||
permalink: true
|
||||
plugins:
|
||||
- search
|
||||
- mermaid2
|
||||
nav:
|
||||
- Home: index.md
|
||||
- Usage: usage.md
|
||||
- Development: development.md
|
||||
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
name = "ai-ffmpeg-cli"
|
||||
version = "0.1.1"
|
||||
version = "0.1.2"
|
||||
description = "AI-powered CLI that translates natural language to safe ffmpeg commands"
|
||||
readme = { file = "README.md", content-type = "text/markdown" }
|
||||
license = { file = "LICENSE" }
|
||||
|
||||
Reference in New Issue
Block a user