Skip to main content

Convert YouTube videos to Anki decks.

Project description

youtube-to-anki

Converts a YouTube video into Anki Cards.

Takes a YouTube video with audio in your target language and transcript (subtitles) in your native language and converts it into an .apkg file that can easily be imported into Anki. The Anki cards have the target language audio on the front and the native language transcript on the back. I hope this helps improving your listening comprehension.

Installation

PyPI

pip install youtube-to-anki

Note: When you install this package though pip, you will have to manually install ffmpeg afterwards. One easy way to accomplish this is with conda.

conda create --name youtube-to-anki ffmpeg pip
conda activate youtube-to-anki
pip install youtube-to-anki
youtube-to-anki --help

Conda

Coming soon ...

Usage

CLI

You can use the command like interface like this:

youtube-to-anki <video_id>

Where <video_id> can be extracted from a YouTube URL like this:

https://www.youtube.com/watch?v=<video_id>

There are some CLI options you can provide, for example for choosing the transcript language. Check youtube-to-anki --help for details.

Importing to Anki

youtube-to-anki produces an .apkg file, which can easily be imported into Anki. In Anki, just click "File" -> "Import".

Listing Available Transcripts

youtube-to-anki calls youtube-transcript-api for requesting the video transcripts. If you're unsure what value to provide to the --transcript-language option, you can list all available languages with youtube_transcript_api --list-transcripts <video_id>.

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

youtube-to-anki-0.1.3.tar.gz (5.0 kB view hashes)

Uploaded Source

Built Distribution

youtube_to_anki-0.1.3-py3-none-any.whl (7.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page