We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Right now these changes have to be manually sync'd to vimeo.
I have a script I cobbled together that will push them up to vimeo, but its not automatic.
What I would like is that anytime a file changes, we push that to vimeo so the updated captions are up there.
This would require that we put the video ID in the title, or some sort of metadata.
Also I would like to do this with translated captions as well.
Not an immediate need, but something to think about @lfades
const Vimeo = require('vimeo').Vimeo; const axios = require('axios'); const lib = new Vimeo( 'nah', 'nah', 'nahhhhhhh' ); const fs = require('fs'); const videoData = require('../../../Sites/bosmonster/site/data/videos-JS3'); const videos = videoData.videos.filter(video => video.caption).map(video => { video.texttrack = fs.readFileSync(`../../Wes-Bos-Captions/${video.caption}`); return video; }); function uploadCaption(video) { return new Promise((resolve, reject) => { const path = `/videos/${video.id}/texttracks`; lib.request( { method: 'POST', path, query: { type: 'captions', language: 'en', name: `${video.title} Captions`, }, }, (err, body) => { axios .put(body.link, video.texttrack) .then(res => { resolve(`Finished ${video.title}`) }) .catch(err => { reject(`error on video ${video.id}`) console.log(err); }); } ); }); } let i = 1; async function go() { const video = videos[i]; console.log(`Starting ${video.title}`); const res = await uploadCaption(video); console.log(res); i++; if (videos[i]) { go(); } } go().catch(console.error);
@lfades
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Right now these changes have to be manually sync'd to vimeo.
I have a script I cobbled together that will push them up to vimeo, but its not automatic.
What I would like is that anytime a file changes, we push that to vimeo so the updated captions are up there.
This would require that we put the video ID in the title, or some sort of metadata.
Also I would like to do this with translated captions as well.
Not an immediate need, but something to think about @lfades
@lfades
The text was updated successfully, but these errors were encountered: