Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 988 Bytes

README.md

File metadata and controls

30 lines (20 loc) · 988 Bytes

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.