Convert Youtube captions into an EPUB file
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Milo Fultz e36dec0c48 Add lang specification and better parsing 4 months ago
.gitignore Add gitignore 4 months ago
README.md Add lang specification and better parsing 4 months ago
sub2pub.sh Add lang specification and better parsing 4 months ago

README.md

SUB 2 PUB

Outputs an EPUB of the video's subtitles.

Usage

./sub2pub.sh video_url [--auto] [--lang [language code]] [--list-subs]
  • video_url - String of the youtube URL. e.g. "https://www.youtube.com/watch?v=NVGuFdX5guE"
  • --auto - Uses the auto-generated English captions. Use this if no user made caption exists. (DOES NOT WORK YET)
  • --lang [language code] (default: en) - Specify the language of caption to download. Use the code specified in --list-subs.
  • --list-subs - List all available subtitles, including auto generated/translated.

Requirements

  • I made this in OSX, so you'll need OSX I think
  • Calibre's CLI tools - Install Calibre and these are installed automatically
  • yt-dlp
  • Unix suite of tools (sed, perl in particular)