mazkdevf / animate-code-lib

A convenient tool to export code arrays to video files, mirroring the website's functionality.

Home Page:https://www.animate-code.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Animate Code Exporter LIB

This lib is like a handy helper for animate-code.com, created by Josh. 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.

Usage

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.

About

A convenient tool to export code arrays to video files, mirroring the website's functionality.

https://www.animate-code.com/

License:MIT License


Languages

Language:JavaScript 100.0%