Skip to main content

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

Project description

video-to-article

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.4.tar.gz (162.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.4-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: video_to_article-0.1.4.tar.gz
  • Upload date:
  • Size: 162.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.4.tar.gz
Algorithm Hash digest
SHA256 e55e01a307bd9057d7e9c6938fbf0d05031ccb2c7a1d2568aad8ed4efc1f4dd7
MD5 c9b8b6ccee2ee22c1a373a54dd80b6d3
BLAKE2b-256 8f1d9b5fe8cc372c3ed216713920b42c4b1282af280f1178be87dcf7a7fc0fce

See more details on using hashes here.

File details

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

File metadata

  • Download URL: video_to_article-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 14.2 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 373ca4dbf29c6aa3ba7534f70356106b48beca1ba7f25f1224e45032143cedb7
MD5 398ae0938688bc1b47c3f6de2170c6a3
BLAKE2b-256 2c6ab810677bd0e9256878528091c76bf590f8242aa4c55f566955ccf320f3be

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