Add update.py script to combine download and convert functionality with --update flag#13
Draft
Copilot wants to merge 3 commits into
Draft
Add update.py script to combine download and convert functionality with --update flag#13Copilot wants to merge 3 commits into
Copilot wants to merge 3 commits into
Conversation
Co-authored-by: davelab6 <261579+davelab6@users.noreply.github.com>
Co-authored-by: davelab6 <261579+davelab6@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add update script to combine functionality of existing scripts
Add update.py script to combine download and convert functionality with --update flag
Oct 22, 2025
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.
Overview
This PR adds a new
scripts/update.pyscript that combines the functionality of bothdownload.pyandconvert_transcripts.py, streamlining the workflow for managing YouTube transcripts. The script downloads transcripts directly into the Jekyll site structure, eliminating the need to run two separate scripts.Key Features
Combined Download + Convert Workflow
The new script integrates the YouTube download functionality from
download.pywith the Jekyll post generation fromconvert_transcripts.py. Instead of:download.pyto fetch transcripts into./transcripts/convert_transcripts.pyto convert them to Jekyll formatYou can now simply run:
This will:
_posts/with proper YAML front matter_includes/captions/named by YouTube IDUpdate Mode with --update Flag
The script now supports updating existing posts with current view and like counts:
This feature:
_posts/to extract YouTube IDsview_countandlike_countfieldsAdditional Options
# Start processing from a specific video (useful for resuming interrupted runs) python3 scripts/update.py --offset 50Documentation Updates
Updated
scripts/README.mdwith comprehensive documentation for bothdownload.pyandupdate.py, following the same structure as the existingconvert_transcripts.pysection. Each section includes:Testing
All core functionality has been thoroughly tested:
youtube_idvaluesview_countandlike_countin YAML front matterFiles Changed
scripts/update.py(NEW) - 392 lines combining download and convert functionalityscripts/README.md- Added documentation sections for download.py and update.py.gitignore- Added Python cache file patterns (__pycache__/,*.py[cod], etc.)This enhancement significantly improves the maintainability of the transcript site by providing a single, unified tool for both initial downloads and ongoing updates.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.