https://github.com/mazkdevf/animate-code-lib
A convenient tool to export code arrays to video files, mirroring the website's functionality.
https://github.com/mazkdevf/animate-code-lib
animate-code animate-codecom animatecode animatecodecom animatecodelib codeanimation javascript library
Last synced: 3 months ago
JSON representation
A convenient tool to export code arrays to video files, mirroring the website's functionality.
- Host: GitHub
- URL: https://github.com/mazkdevf/animate-code-lib
- Owner: mazkdevf
- License: mit
- Created: 2024-02-04T00:31:48.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-04T00:38:36.000Z (about 2 years ago)
- Last Synced: 2024-12-27T17:27:55.670Z (about 1 year ago)
- Topics: animate-code, animate-codecom, animatecode, animatecodecom, animatecodelib, codeanimation, javascript, library
- Language: JavaScript
- Homepage: https://www.animate-code.com/
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Animate Code Exporter LIB
This lib is like a handy helper for [animate-code.com](https://www.animate-code.com), created by [Josh](https://github.com/joschan21). It makes exporting code to a video super easy, just like how you do it on the website.
You can also check out how it works by watching this [YouTube video](https://youtu.be/OXk6Eabu7uM?si=AxkItQ6-oyZR1i1b).
## Usage
```javascript
const animateCodeLib = require("./animateCode");
const animateCode = new animateCodeLib();
async function main() {
console.clear();
let decorativeFileName = "test.py";
let slideContents = [
"print('')",
"print('Hello, World!')",
];
slideContents = slideContents.map(slideContent => Buffer.from(slideContent).toString("base64"));
await animateCode.automaticExport(decorativeFileName, slideContents);
}
main();
```
By running this script, a file with the name `{randomizedId}.mp4` will be generated in the same directory as the script itself.