0.0.2 • Published 9 years ago

tplobj v0.0.2

Weekly downloads
54
License
MIT
Repository
github
Last release
9 years ago

tplobj Build Status

Install

npm install tplobj

Example

var spawn = require("child_process").spawn;
var tplojb = require("tplobj")("${", "}");

var tpl = {
  command: "ffmpeg",
  args: [
    "-i", "${input}",
    "-vn",
    "-acodec", "${codec}",
    "${output}"
  ],
  options: {
    cwd: "${directory}"
  }
};

var obj = {
  input: "C:\\Users\\John\\Downloads\\My favorite music video.mkv",
  codec: "libmp3lame",
  output: "D:\\Music\\My favorite song.mp3",
  directory: "C:\\Users\\John\\AppData\\Local\\Temp"
};

var res = tplobj(tpl, obj);

var ffmpeg = spawn(res.command, res.args, res.options);
...