Skip to content

Instantly share code, notes, and snippets.

@mattb
Created January 1, 2024 23:43
Show Gist options
  • Save mattb/aad1c6bf2ba98e025c36a77f2e4f0cb5 to your computer and use it in GitHub Desktop.
Save mattb/aad1c6bf2ba98e025c36a77f2e4f0cb5 to your computer and use it in GitHub Desktop.
Download the automatic subtitle track from Youtube and summarize it with a local LLM
yt-dlp --skip-download --write-auto-sub --sub-format ttml --sub-lang en -o /tmp/out $1 &&
(
echo 'Summarize the following YouTube transcript:\n' > /tmp/out1
cat /tmp/out.en.ttml | grep ^\<p | cut -d\> -f 2 | cut -d \< -f 1 >> /tmp/out1
cat /tmp/out1 | ollama run mistral
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment