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.2.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

youtube_to_anki-0.1.2-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file youtube-to-anki-0.1.2.tar.gz.

File metadata

  • Download URL: youtube-to-anki-0.1.2.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.9.4 Linux/5.4.0-1043-azure

File hashes

Hashes for youtube-to-anki-0.1.2.tar.gz
Algorithm Hash digest
SHA256 bb1b7bef010299c4c1ac9d6fc4ae595327034fedf76d967bede37bbf7dc1f744
MD5 3a7870b6358954c1e605b8063b2df27a
BLAKE2b-256 6631cd237559fe3000fa08549011a6a22917672b3feae03f3563907fd49741b3

See more details on using hashes here.

File details

Details for the file youtube_to_anki-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: youtube_to_anki-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.9.4 Linux/5.4.0-1043-azure

File hashes

Hashes for youtube_to_anki-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bc3f1bfa2627c563e3f99671fdf92d26988927a3442ed4c066c13aaea425af83
MD5 7b30d9c451122c95f836227e37f55d03
BLAKE2b-256 f557da91eb2893bfe19f48cc1b172ca9e849448d6b8ad7eba7fb32b6307fb395

See more details on using hashes here.

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