Skip to main content

A LLM plugin for YouTube transcripts as fragments

Project description

llm-yt-transcript

PyPI Changelog Tests License

llm-yt-transcript is a LLM plugin for YouTube transcripts as fragments. It leverages yt-dlp for downloading subtitles.

Installation

llm install llm-yt-transcript

Usage

Download Subtitles

Use the download_subtitles function to download subtitles for a YouTube video:

llm -f ytt:{youtube_video_url} 'summarize the transcript'

by default, it will download the English subtitles. You can specify the language using the lang parameter before the :. For example, to download Spanish subtitles, use:

llm fragments show ytt:es:{youtube_video_url}

Controlling Logging

You can control the logging behavior by setting the LLM_YT_LOG environment variable. For example:

export LLM_YT_LOG=debug

Supported log levels are:

  • debug: Most verbose output, useful for debugging
  • info: General information messages
  • warning: Warning messages only (default)
  • error: Error messages only
  • critical: Critical error messages only

The default level is warning.

These log levels correspond directly to yt-dlp's internal logging system.

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd llm-yt-transcript
uv sync --all-groups

Run the following command to run the tests:

uv run pytest

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

llm_yt_transcript-0.1.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

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

llm_yt_transcript-0.1.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file llm_yt_transcript-0.1.0.tar.gz.

File metadata

  • Download URL: llm_yt_transcript-0.1.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for llm_yt_transcript-0.1.0.tar.gz
Algorithm Hash digest
SHA256 adf85eebdd1fe33bdb945edadacff320fea3edad2b8ccb8aabaddab76d37617f
MD5 cff31b86fb4457bef412a807e6c26c08
BLAKE2b-256 f7c8f7378b2d8f722048d82b6bb60b2980a2ec889bf4e86479ca1ab1584e4c69

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_yt_transcript-0.1.0.tar.gz:

Publisher: publish.yml on kj-9/llm-yt-transcript

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file llm_yt_transcript-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llm_yt_transcript-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c5b71fd35424f1d4e7bf7cc90149aae401198568f48f4a4fb1f417cdc48a26bd
MD5 d5b0770af54b225b3e0d3c55474b2423
BLAKE2b-256 63cdf27f82ecf47a004a3ebf3a3e33b03d59ef31b6b2854d1bdb409d81256ab9

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_yt_transcript-0.1.0-py3-none-any.whl:

Publisher: publish.yml on kj-9/llm-yt-transcript

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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