GitXplorerGitXplorer
j

youtube-to-anki

public
4 stars
2 forks
2 issues

Commits

List of commits on branch main.
Unverified
0ac7170123b11a154353a953a0cf4e916aa6c4f8

add FAQ

jjanjagusch committed 4 years ago
Unverified
90467df36dcf0e99c4ae4bf8f50aba94e86811b5

add good example videos

jjanjagusch committed 4 years ago
Unverified
33e1addbab265903f5321c1a29c01c4012f3aa54

add conda installation instructions to readme

jjanjagusch committed 4 years ago
Verified
7d3d80e8e97c3ee80ca9e04444e747aaa9e0e301

Merge pull request #8 from janjagusch/fix-type-error

jjanjagusch committed 4 years ago
Unverified
6f05d042ead4ffe4bb79f91297398fd4ebe04b37

bump version to 0.1.3

jjanjagusch committed 4 years ago
Unverified
32c0cfb034f42fd54b92caa20cc8a25aed2cd5f4

convert deck_id to int

jjanjagusch committed 4 years ago

README

The README file for this repository.

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

conda

The preferred way to install this package is using conda:

conda install youtube-to-anki

pip

You can also install it through pip:

pip install youtube-to-anki

However, when you install this package though pip, you will have to manually install ffmpeg afterwards.

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>.

Good Example Videos

FAQ

Video IDs Starting with -

If your video ID starts with an -, e.g. -qAuGimugds the CLI will try to parse this as an option, which can result in strange errors like this:

youtube-to-anki --transcript-language=de -qAuGimugds
Usage: youtube-to-anki [OPTIONS] VIDEO_ID
Try 'youtube-to-anki --help' for help.

Error: no such option: -q

Instead you will have to separate the CLI options and the video ID with a -- like this:

youtube-to-anki --transcript-language de -- -qAuGimugds