{"id":26397654,"url":"https://github.com/andrepradika/merge-webvtt","last_synced_at":"2025-03-17T12:18:33.598Z","repository":{"id":281887418,"uuid":"946765662","full_name":"andrepradika/merge-webvtt","owner":"andrepradika","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-11T16:42:37.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-11T17:47:27.461Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andrepradika.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-11T16:34:40.000Z","updated_at":"2025-03-11T16:42:40.000Z","dependencies_parsed_at":"2025-03-11T17:47:29.984Z","dependency_job_id":"7a5286d9-b538-4090-ac13-2b9446ad383a","html_url":"https://github.com/andrepradika/merge-webvtt","commit_stats":null,"previous_names":["andrepradika/merge-webvtt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrepradika%2Fmerge-webvtt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrepradika%2Fmerge-webvtt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrepradika%2Fmerge-webvtt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrepradika%2Fmerge-webvtt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrepradika","download_url":"https://codeload.github.com/andrepradika/merge-webvtt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244031119,"owners_count":20386534,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-17T12:18:33.136Z","updated_at":"2025-03-17T12:18:33.583Z","avatar_url":"https://github.com/andrepradika.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VTT Merging Script\n\nThis Python script merges `.vtt` subtitle files from two folders (`watch` and `shorts`) and combines them into merged `.vtt` files. It outputs three merged subtitle files:\n- One for captions from the `watch` folder.\n- One for captions from the `shorts` folder.\n- One combining all captions from both folders.\n\n## Requirements\n\n- Python 3.x\n- `webvtt-py` library for reading `.vtt` files. You can install it using pip:\n\n```bash\npip install webvtt-py\n```\n\n## File Structure\n\nEnsure the following folder structure:\n\n```\nyour_project_folder/\n├── watch/                # Folder containing VTT files for \"watch\"\n├── shorts/               # Folder containing VTT files for \"shorts\"\n├── merge/                # Folder where merged VTT files will be saved\n├── merge_vtt.py          # Python script (this script)\n```\n\n- **`watch/`**: Place `.vtt` files related to \"watch\" content here.\n- **`shorts/`**: Place `.vtt` files related to \"shorts\" content here.\n- **`merge/`**: The merged `.vtt` files will be saved in this folder.\n\n## Usage\n\n1. Place your `.vtt` subtitle files into the `watch/` and `shorts/` folders.\n2. Run the script:\n\n```bash\npython merge_vtt.py\n```\n\n3. The script will generate the following merged files in the `merge/` folder:\n    - `watch_merge.vtt`: Merged captions from the `watch` folder.\n    - `shorts_merge.vtt`: Merged captions from the `shorts` folder.\n    - `all_merge.vtt`: Merged captions from both the `watch` and `shorts` folders.\n\n## How It Works\n\n- The script reads all `.vtt` files in the `watch/` and `shorts/` folders.\n- It merges the captions from these files and stores the result in a new file.\n- Three merged `.vtt` files are generated:\n  - **`watch_merge.vtt`**: Contains merged captions from the `watch` folder.\n  - **`shorts_merge.vtt`**: Contains merged captions from the `shorts` folder.\n  - **`all_merge.vtt`**: Contains merged captions from both `watch` and `shorts` folders.\n\n## Folder and File Paths\n\nThe following paths are used in the script:\n- **`watch_folder`**: Path to the folder containing the `watch` `.vtt` files (`../watch`).\n- **`shorts_folder`**: Path to the folder containing the `shorts` `.vtt` files (`../shorts`).\n- **`merge_results_folder`**: Path to the folder where the merged `.vtt` files will be saved (`merge/`).\n\n## Example\n\n### Folder Structure:\n\n```\nyour_project/\n├── watch/\n│   ├── video1.vtt\n│   ├── video2.vtt\n├── shorts/\n│   ├── short1.vtt\n│   ├── short2.vtt\n├── merge/\n│   ├── watch_merge.vtt\n│   ├── shorts_merge.vtt\n│   ├── all_merge.vtt\n```\n\n### Output Example:\n\nAfter running the script, the `merge/` folder will contain:\n\n```\nmerge/\n├── watch_merge.vtt\n├── shorts_merge.vtt\n├── all_merge.vtt\n```\n\n## License\n\nMIT License (or your preferred license)\n\n## Author\nandrepradika\n\nsh```\nyt-dlp --write-auto-subs --skip-download --sleep-requests 1.25 --min-sleep-interval 60 --max-sleep-interval 90 -o \"%(uploader)s/%(title)s.%(ext)s\" \"https://www.youtube.com/@MyFirstMillionPod\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrepradika%2Fmerge-webvtt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrepradika%2Fmerge-webvtt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrepradika%2Fmerge-webvtt/lists"}