Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 739 Bytes

README.md

File metadata and controls

38 lines (27 loc) · 739 Bytes

sus-2-image

SeaUrchinScore to Image for node

npm sus:v2.17.0

Description

*.sus to Image.

Installation

$ yarn add sus-2-image

How to use

const Sus2Image = require('sus-2-image')
const fs = require('fs')

const sus = fs.readFileSync('example.sus','utf8')

Sus2Image.getSVG(sus).then(image => {
  fs.writeFileSync(`score.svg` , image)
})

Sus2Image.getPNG(sus).then(image => {
  fs.writeFileSync(`score.png` , image)
})

Sus2Image.getPNGs(sus).then(images => {
  images.forEach((image, index) => {
    fs.writeFileSync(`score_${index}.png` , image)
  })
})