Repository navigation
Upload a post's videos to YouTube when publishing, once each - #7
Merged
Merged
Conversation
Adds YouTube as a second account (:youtube, File → Connect YouTube…), with an OAuth sign-in kept in the keychain like the Substack cookie. The Substack publish dialog gains a Videos choice: upload local videos to YouTube and embed them, or link to the file. Each upload is keyed by the file's content hash in youtube-uploads.json, and reused while YouTube still has it, so publishing again never makes a duplicate. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Substack's API can't take video, so a post's local videos had nowhere to go. This adds YouTube as a second account and uploads them there.
What's new
:youtube, File → Connect YouTube…,⌘/menu): a dialog like the Substack one. Enter a Google OAuth Client ID and secret, then sign in through the browser. The sign-in is kept in the keychain. Once signed in, the dialog shows your channel and a Privacy choice (Unlisted by default).stet-substack/src/convert.rs).youtube-uploads.json. Publishing again reuses the video while YouTube still has it, and uploads it again if it was deleted. Only one upload runs at a time, and a failed upload isn't recorded.stet-youtube(OAuth, resumable upload, upload record, keychain), behind the defaultyoutubefeature.Caveats (Google's limits)
Checks
cargo fmt --check,cargo clippy --all-targets --all-features -D warnings,cargo docandcargo test --workspacepass locally on macOS.🤖 Generated with Claude Code