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

By default, llm-yt-transcript does not suppress logs from the yt-dlp library. You can control the logging behavior by setting the LLM_YT_LOG environment variable. For example:

export LLM_YT_LOG=verbose

Supported log modes are:

  • verbose: Adds the --verbose argument to the yt-dlp command for detailed output.
  • quiet: Adds the --quiet argument to suppress most output.
  • default: No additional arguments are passed, using the default logging behavior of yt-dlp.

The default mode is default.

For more details on yt-dlp arguments, refer to the yt-dlp documentation.

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.0a1.tar.gz (5.8 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.0a1-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: llm_yt_transcript-0.1.0a1.tar.gz
  • Upload date:
  • Size: 5.8 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.0a1.tar.gz
Algorithm Hash digest
SHA256 39b7e42bb62160699884c69aeff26ff8b2641cb488e55fa47ce6e9b50d9fc019
MD5 e65fca230ad9718a94bb5075ebed4f2d
BLAKE2b-256 65baef535d41bac36972e86240952fdb082516487b9ced7d4bb432cb41d2d8a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_yt_transcript-0.1.0a1.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.0a1-py3-none-any.whl.

File metadata

File hashes

Hashes for llm_yt_transcript-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 c022d1476973aeb8556b5e964b557d9007fd3d1f032cad3060372f6342a02e5d
MD5 9c194c44e568dafc2a967a53af8a6d4d
BLAKE2b-256 f03e5c01a64dd29c0eead2c0db8945a8e7dbd87933de4c3450a4aa0f671f13d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_yt_transcript-0.1.0a1-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