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

Uploaded Python 3

File details

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

File metadata

  • Download URL: llm_yt_transcript-0.1.0a2.tar.gz
  • Upload date:
  • Size: 6.3 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.0a2.tar.gz
Algorithm Hash digest
SHA256 ce954717294e3711adc26c32f69626e99202c44d752f17408502b70dd40ed30b
MD5 7c85e716c964d711a4bcc1ec0358dfb3
BLAKE2b-256 50b22b2fcc1fefbe0e62ba6a043578b25709c5afb6125e91681c9ba5529f7c5c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for llm_yt_transcript-0.1.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 213c784e6f634bb32b69d3e3fa46dedd8e89aa15eaa826fc97539d86e19648f4
MD5 06568ee4a149d6a0a26fc271128731e4
BLAKE2b-256 1c6dc5510de868a62f2f12f367a668a0c7bf37cdc339ce0a9cc9de543bf7f93a

See more details on using hashes here.

Provenance

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