Coder Social home page Coder Social logo

docode's Introduction

DoCode

IMG

A tool that automatically generates media files, such as videos, GIFs, and screenshots, from your JavaScript sketch file.

The DoCode home page - https://mgs.github.io/docode/

Installation

Requirements

1. Make sure that Node.js is installed on your machine.
Open your terminal and type:

$ node -v

If Node.js is not installed, please go to the Node.js official site and install it.

  1. Make sure that ImageMagick is installed on your machine.
    Open your terminal and type:
$ convert

If ImageMagick is not installed, please go to the ImageMagick download page and install it, or type the following command on the terminal:

$ brew install imagemagick
  1. Make sure that ffmpeg is installed on your machine.
    Open your terminal and type:
$ ffmpeg

If ffmpeg is not installed, please go to the ffmpeg Mac OS X download page and install it, or type the following command on the terminal:

$ brew install ffmpeg
DoCode Installation (on a Mac)
  1. Install the doCode NPM package globally:
$ sudo npm install docode -g

You might be asked to enter you Mac user password.

  1. Check that doCode was installed correctly:
$ docode

Should return the docode help ✊.

How to use

Generate screenshots from a p5.js sketch

While in the project (sketch) main folder, run the following command:

$ docode screenshots

You can also specify the number of screenshots and the interval between the screenshots in seconds, like this:

$ docode screenshots [number_of_images] [interval]

For example, to receive 30 screenshots with 2 seconds between them, use:

$ docode screenshots 30 2

Generate a GIF from a p5.js sketch

While in the project main folder, run the following command:

$ docode gif

Specify the number of images in the GIF and the interval between them in seconds, like this:

$ docode gif [number_of_images] [interval]

For example, to receive a GIF from 120 images with 0.5 seconds between them, use:

$ docode gif 120 0.5

Generate a video from a p5.js sketch

While in the project main folder, run the following command:

$ docode video

Specify the length of the video in seconds and the interval between images, that will be used to create the video, like this:

$ docode video [length] [interval]

For example, to receive a 24 seconds video that was created from images that were taken in intervals of 1.4 seconds between them, use:

$ docode video 24 1.4

Uninstall (on a Mac)

Use the following command:

$ sudo npm uninstall -g docode

You might be asked to enter you Mac user password.

Contributors

DoCode was built with ❤️ by:
😎 Michael Simpson
🤗 Eric Li
🤠 Alejandro Matamala
😝 Dror Ayalon

With the support of:
Patrick Hebron
Rune Madsen
at NYU ITP

License

You can check out the full license here

This project is licensed under the terms of the MIT license.

docode's People

Contributors

mgs avatar dodiku avatar matamalaortiz avatar wenqili avatar adamantino avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.