This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# frozen_string_literal: true | |
# This script downloads the English auto-generated subtitles for a YouTube video, | |
# converts them to a single text block, and sends them to OpenAI for summarization. | |
# Requirements: | |
# - yt-dlp (brew install yt-dlp) | |
# - OpenAI Ruby gem (gem install 'ruby-openai') | |
# - An OpenAI API key set as an environment variable (export OPENAI_API_KEY=your-api-key) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# spec/channels/stubs/test_adapter.rb | |
class SuccessAdapter < ActionCable::SubscriptionAdapter::Base | |
def broadcast(channel, payload) | |
end | |
def subscribe(channel, callback, success_callback = nil) | |
end | |
def unsubscribe(channel, callback) | |
end |