wesbos / Wes-Bos-Captions

Captions for my video courses
478 stars 321 forks source link

Added script to automatically upload text tracks to Vimeo #62

Open lfades opened 5 years ago

lfades commented 5 years ago

Related to #61

This PR includes the following:

The usage instructions below are not included in the Readme, @wesbos Should they be included in the readme or another .md file ?.

Uploading files to Vimeo

An script is included to help in the task of uploading the recent changes in captions to Vimeo, to use it follow the next steps:

First create the file .env (ignored by the repo) and include the following secrets, replacing XXXXX with an actual key.

VIMEO_CLIENT_ID=XXXXX
VIMEO_SECRET=XXXXX
VIMEO_ACCESS_TOKEN=XXXXX

Now run the script:

npm run upload

That's it, by default it will check from HEAD (Most recent commit) to the last commit checked last time, which is saved in the file .last-commit. Once the process is done, the corresponding commit for HEAD will now be saved in .last-commit. So if it comes to be required to check for an older commit, just edit .last-commit directly.

lfades commented 5 years ago

@wesbos I did multiple tests for the script, comparing from the newest commit to the first commit ever made and it worked, the only thing I didn't test was the uploadCaption function from here which remains very much the same.

wesbos commented 5 years ago

I wonder if we can use the new GitHub actions to automatically push these

https://techcrunch.com/2018/10/16/github-launches-actions-its-workflow-automation-tool/