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]

Or 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.2.tar.gz (126.1 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.2-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: video_to_article-0.1.2.tar.gz
  • Upload date:
  • Size: 126.1 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.2.tar.gz
Algorithm Hash digest
SHA256 a34866b487e70c3c286ed30570f21b2c21514216c3d758babd2e23abcb6f0c8e
MD5 e5e6d3c7933faab484e3f220ac6b57ba
BLAKE2b-256 078f7fdfb920f065e1045172b9f4f304a48b242073d14e3f8a116f0fb463fc2d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: video_to_article-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 14.0 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1b8f444a9703b175688eb852778e3dc4317aec6a50f16f9d7ad44b5891109bb5
MD5 c3f11f6825c6d9af469ce3d1d6b61a1d
BLAKE2b-256 e0a189a9badbf2eadf3dc2343704a76f9a729b534e384227bf59f40ff0e4b4c4

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