Replies: 4 comments
-
Hi @cbelzunce! For scripting commands and coding things such as loops, assuming you are on Linux or Mac, you can create a bash script. See here for an example: https://www.cyberciti.biz/faq/bash-for-loop/ You can put this into a Regarding your second question how to parametrize, you can use the Finally, if you feel more comfortable with JS than Bash, you can also consider using our Node.JS APIs - then you just pass your JSON data with the Hope that helps! |
Beta Was this translation helpful? Give feedback.
-
Thank you very much for pour help!
Le ven. 6 août 2021 à 09:40, Jonny Burger ***@***.***> a
écrit :
… Hi @cbelzunce <https://github.com/cbelzunce>!
For scripting commands and coding things such as loops, assuming you are
on Linux or Mac, you can create a bash script. See here for an example:
https://www.cyberciti.biz/faq/bash-for-loop/
You can put this into a script.sh file and then run the script with sh
script.sh.
Regarding your second question how to parametrize, you can use the --props
command line flag to pass a JSON object to the React component if you are
using the CLI. We wrote everything about it here:
https://www.remotion.dev/docs/parametrized-rendering/
Finally, if you feel more comfortable with JS than Bash, you can also
consider using our Node.JS APIs - then you just pass your JSON data with
the inputProps parameter and read them the same way:
https://www.remotion.dev/docs/ssr/
Hope that helps!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#543 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE3NWBITC7A54UIQPBYKKULT3OGXDANCNFSM5BUF6AMQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
Beta Was this translation helpful? Give feedback.
-
If you want to stay most of the time in the JS-land, you can try out zx for the same purpose as the bash script suggested above. I've never tried it myself but it looks like a valid option for it, especially since it opens up for async inputs. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much ! I finally did it with Bash and the --props option ;)
Le ven. 6 août 2021 à 16:50, Arthur Denner ***@***.***> a
écrit :
… If you want to stay most of the time in the JS-land, you can try out zx
<https://github.com/google/zx> for the same purpose as the bash script.
I've never tried it myself but it looks like a valid option for it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#543 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE3NWBOYM3SAB6SRTTHKFMTT3PZCDANCNFSM5BUF6AMQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello !
I've been testing a small Remotion project. So far, I can create a simple video with animations.
I'd like to be able to create several videos with one unique command line, but as I am new with ReactJs (and don't know much about NodeJs) I don't know how I can do it.
So far I'm using the basic command npm start build, which creates the video file from a React component. I'd like to change several variables in the React component itself, but from the command line, and then use a loop to launch the npm run build 10 times in a row, to create 10 video files.
How can I pass variables from a script in node.js to a React component ? How can I access it from the component itself? And I can I "loop" on a nodejs command ?
Sorry if the question isn't only about Remotion but I'm new to these technologies ;)
Beta Was this translation helpful? Give feedback.
All reactions