Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/janjagusch/youtube-to-anki
Converts a Youtube Video into Anki Cards.
https://github.com/janjagusch/youtube-to-anki
Last synced: 11 days ago
JSON representation
Converts a Youtube Video into Anki Cards.
- Host: GitHub
- URL: https://github.com/janjagusch/youtube-to-anki
- Owner: janjagusch
- License: mit
- Created: 2021-04-04T08:20:04.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-03T05:51:54.000Z (over 1 year ago)
- Last Synced: 2023-03-06T18:01:13.352Z (over 1 year ago)
- Language: Python
- Size: 40 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://github.com/conda/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](https://ffmpeg.org/download.html) afterwards.
## Usage
### CLI
You can use the command like interface like this:
```
youtube-to-anki
```Where `` can be extracted from a YouTube URL like this:
`https://www.youtube.com/watch?v=`
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](https://github.com/jdepoix/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 `.
## Good Example Videos
- π―π΅: [Yuzuhiko's Cat Hands EP 280 | Atashin'chi](https://www.youtube.com/watch?v=Uw6ONSGyWZ4)
- π©πͺ: [Nicos Weg β A1 β Folge 3: TschΓΌss!](https://www.youtube.com/watch?v=idFrq0H1Af0) (here you'll have to set `--transcript-language de`)## 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
```