Skip to main content

A simple CLI to fetch plain text transcripts in english from YouTube videos. Powered by youtube-transcript-api. Cached to local disk.

Project description

yttan

yttran (“YouTube Transcript”) is a lightweight CLI tool that allows you to quickly fetch the plain transcript text from YouTube videos without downloading the video itself. It leverages the official youtube-transcript-api and can be run via uvx for easy, one-step usage.


Problem

YouTube videos often have captions or auto-generated transcripts.

There are websites like https://transcribefromyoutube.com/ that one can use to get a transcript but they require you to leave the terminal and copy paste the text for further processing.

A CLI lternative is to use the cli that comes with youtube-transcript-api but I can never remember all the switches nor do I want to type all of those long commands.

uvx run youtube_transcript_api <first_video_id> <second_video_id> ... --languages en --format text > transcripts.txt

I need to be able to run a short command and specify only the youtube video so that I can pipe transcript into AI analysis and summarization tools. I also what to save the transacript into a local cache to I don't need to fetch it again.

Further processing to extract summaries and wisdonm can be done with tools like Claude AI, ChatGPT or Fabric.

Insummary, in order to maximize learning from Youtube videos...

  • Downloading full videos just to get transcription text is cumbersome.
  • Subtitles come in .srt or .vtt formats, which include timestamps, numbering, and formatting tags.
  • Cleaning and deduplicating these files is tedious, especially when automating workflows.

yttran solves this by providing a single command to get clean, readable transcript text, ready for passing on to AI pipelines, research, or note-taking.


Dependency

uv manages project dependencies and environments for python packages.

See https://docs.astral.sh/uv/#installation

Code repository

https://github.com/rnwolf/yttran

Install package during development for testing

uv pip install .

Now you can run the cli tool binary.

Example run on MS-Windows:

.\.venv\Scripts\yttran.exe https://www.youtube.com/watch?v=4b0iet22VIk > test-tran.txt

Publish Packge to PyPi for world to use

Make sure verions number of package is incremented as required in pyproject.toml

uv build
uv publish

You’ll need your PyPI credentials (username and password).

After publishing, verify your package is live on PyPI by visiting:

https://test.pypi.org/project/yttran/

Installation Published Public Package for use on local PC

If you have uvx installed, you can run yttan directly from PyPI without manual dependency management:

uvx yttran <youtube-video-url-or-id> > transcript.txt

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

yttran-0.2.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

yttran-0.2.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file yttran-0.2.0.tar.gz.

File metadata

  • Download URL: yttran-0.2.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.0

File hashes

Hashes for yttran-0.2.0.tar.gz
Algorithm Hash digest
SHA256 579a6098f787a86c7634d2076f5c385795dcd5c27a0df7b0e5d8fa9323475531
MD5 35b6c81ed2e81bd57579d07a5cdbfc30
BLAKE2b-256 b24883c1de6c4f2bbcd6f2d5cd82d80d80b14a777a6e5f790ce9a2bcd325d41d

See more details on using hashes here.

File details

Details for the file yttran-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: yttran-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.0

File hashes

Hashes for yttran-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 892ef87fd963727d9051710466b2578dc7e39add37b38d54434a46a995c41f92
MD5 7cb5b151afeabb3222e0c7bed58a52f4
BLAKE2b-256 55075690336bd8552e48a658ae1fd04e5c12b77a2531c176b9cbee76b9699a27

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