Skip to main content

Turn YouTube videos into articles using subtitles and AI (OpenAI or local MLX).

Project description

video-to-article

Turn YouTube videos into articles: downloads subtitles and description with yt-dlp, then uses an AI model to draft an article and optionally add a critical review section. Output is saved as HTML (and intermediate files) under a per-video directory.

Mac users new to the command line: see MAC_SETUP.md for installing Python, Homebrew, and running the tool in Terminal.

Install

pip install video-to-article

For local models (MLX on Apple Silicon):

pip install video-to-article[mlx-lm]

On M3 Pro Mac we recommend the Qwen/Qwen3-8B model: v2a <url> -m Qwen/Qwen3-8B.

You can also install from source with uv: uv sync then uv run v2a ....

Setup

  • OpenAI: For cloud models, set OPENAI_API_KEY. Get a key at API keys.
  • YouTube / yt-dlp: Subtitle download uses EJS and impersonation (included). For full compatibility, a JavaScript runtime on your PATH is recommended so yt-dlp can run its challenge solver (otherwise you may see warnings and some videos may fail). Install Deno if you don’t have one—e.g. brew install deno (macOS) or see Deno’s install guide for Linux/Windows.

Usage

Usage: v2a [OPTIONS] VIDEO_URLS...

Convert YouTube videos to articles using AI.

Extra options (e.g. --temperature 0.7) are passed to the model.

╭─ Arguments ─────────────────────────────────────────────────────────────────────────────────────────────╮
│ *    video_urls      VIDEO_URLS...  YouTube video URLs to process [required]                            │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────╮
│ --model        -m      TEXT  Model name or path [default: gpt-5.2]                                      │
│ --output-dir   -o      PATH  Output directory for results [default: articles]                           │
│ --open-browser / --no-open-browser        Open the result HTML in the browser [default: open-browser]   │
│ --overwrite    -f            Overwrite cached step results                                              │
│ --skip-review                Skip the critical review step                                              │
│ --help                       Show this message and exit.                                                │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Example:

v2a "https://www.youtube.com/watch?v=..." -o articles

Run v2a --help anytime for the same reference.

Contributing

Contributions are welcome. In particular, support for other LLM clients (e.g. for Linux or Windows, or other cloud providers) would make the tool more useful—see the generator layer and open an issue or PR.

License

MIT

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

video_to_article-0.1.3.tar.gz (126.2 kB view details)

Uploaded Source

Built Distribution

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

video_to_article-0.1.3-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file video_to_article-0.1.3.tar.gz.

File metadata

  • Download URL: video_to_article-0.1.3.tar.gz
  • Upload date:
  • Size: 126.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for video_to_article-0.1.3.tar.gz
Algorithm Hash digest
SHA256 b2406f46d4fedf64a20a1f201b8074d9802e5875382a53616839a1d91cbc8206
MD5 7f770f64d413b96bfc38afd864f376e2
BLAKE2b-256 076e5f43100bff73bed719244f10146f0650fb508db4c9fee7ff67c2f341006b

See more details on using hashes here.

File details

Details for the file video_to_article-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: video_to_article-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for video_to_article-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f2411f5cbb0393e69c2f8b1ca4eb103d970b05cc2332fc31426999ff5155cd60
MD5 864b5fc21082838c402814f55b8eaa9e
BLAKE2b-256 377b5d955f6db0253c3d3822b4905b53ffba796522be2d895ae9819818dd9b63

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