Code Monkey home page Code Monkey logo

momentus-output's Introduction

#momentus.io ###Output Module Development App #####version 0.0.1

##Setup Instructions:

  1. Install dependencies, clone repo:
# OSX dependencies:
# node-canvas (cairo, pixman): https://github.com/Automattic/node-canvas/wiki/_pages
$ brew install graphicsmagick
$ brew install ghostscript
$ brew install ffmpeg

# Linux dependencies:
$ sudo apt-get update
$ sudo apt-get install libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++
$ sudo apt-get install graphicsmagick
$ sudo apt-get install ghostscript
# install ffmpeg (compile src, gist link below)

# Clone repo and install node modules:
$ git clone https://github.com/jmsaavedra/momentus-output.git
$ cd momentus-output/
$ npm install nodemon -g
$ npm install
  1. Run app
# run with npm (uses nodemon)
$ npm run start

# or just run it reg-sauce
$ node output.js

##How does it work

  • check out the test_moment.json file in /moments folder
    • this is an example of exactly what the momentus app feeds to every output module when it's time for processing
    • more explanation about this object in the momentus.io wiki
  • immediately on running the app, whichever output module you're testing (var myTestModule in output.js) will process this moment object
  • output modules are found in the /modules/output folder. currently only basic_v3 works with this app
  • after your module has processed successfully, you will see a /temp folder created inside of /moments
  • this temp folder contains another folder named with object._id of the moment you just processed (from the .json file)
  • inside of this you will see /basic_v3 (module name) and /source_downloads
    • /basic_v3 contains all files that were processed specifically for this module, including the final output file (.gif for now)
      • includes any processed frames, or resized images (basic_v3 resizes profile pictures, and 1 processed frame per Story)
    • /source_downloads contains any file downloaded for this Moment
      • includes raw profile images and raw story images downloaded.
    • reason for this folder separation: so that multiple output modules don't re-download the same source images over and over
    • in the live-server context, both of these folders will get deleted (after output file is uploaded to S3)
  • after successful processing, you'll see an Output Object get printed. this what you will return to the momentus web app server, and it will do all the final housekeeping (upload your local file to S3, update database, delete temp folder contents, etc)

##Requirements

App

  • node v0.10.35

Output Module "basic"

  • ffmpeg
  • graphicsmagick
  • ghostscript

Output Module "canvas"

  • cairo (node-canvas)

##References / Credits:

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.