From f951924313966b58db01afe07376abaa878394c5 Mon Sep 17 00:00:00 2001 From: trquoccuong Date: Tue, 24 Jan 2017 14:49:40 +0700 Subject: [PATCH] update package.json and document --- README.md | 45 ++++++++++++++++++++++++++++++++++++++++++++- package.json | 12 +++++++++++- 2 files changed, 55 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ed60445..d612045 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,29 @@ # Node wave -Render audio waveform like SoundCloud on backend +> Render audio waveform like SoundCloud on backend + +## Install + +``` +$ npm install node-wave +``` + +## How to use + +Use with express: + +```javascript + +var Waveform = require('node-waveform') +var fs = require('fs') + +Waveform('< mp3 link >', options, function(err , buffer) { + fs.writeFileSync('out.png', buffer) +}) +``` ## Requirement This module base on `web-audio-api` and `canvas` modules. + ## Attribute | Option | Desciption | Default | @@ -19,3 +40,25 @@ Render audio waveform like SoundCloud on backend | padding | Top and bottom padding | 10 | | baselineWidth | baseline width | 1 | | baselineColor | baseline color | white | + +### The MIT License (MIT) + +Copyright (c) <2017> Tran Quoc Cuong + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/package.json b/package.json index 50f75f4..a72fa89 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-wave", - "version": "0.0.2", + "version": "0.0.3", "description": "Render waveform image like SoundCloud", "main": "index.js", "scripts": { @@ -8,6 +8,16 @@ }, "author": "Tran Quoc Cuong ", "license": "MIT", + "keywords": [ + "SoundCloud waveform", + "backend waveform", + "waveform", + "audio waveform" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/trquoccuong/node-wave.git" + }, "dependencies": { "canvas": "^1.6.2", "web-audio-api": "^0.2.2"