Skip to content

Latest commit

 

History

History
37 lines (28 loc) · 1.23 KB

README.md

File metadata and controls

37 lines (28 loc) · 1.23 KB

Node typograph

Uses typograph web-service by Art.Lebesev studio

Install

npm install node-typograph

Usage

From terminal:

typograph -t, --text "text" [-p, --usep] [-b, --usebr] [-m, --maxnobr maxNobr]

From node.js script:

var typograph = require('node-typograph');

var params = {
    text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed semper dui non justo bibendum vel tincidunt arcu tristique. Sed luctus luctus elit ut facilisis. Donec cursus magna a libero interdum ac luctus lacus auctor. Fusce sit amet lorem urna, ut molestie sem. Nunc imperdiet pretium sagittis. Mauris aliquam, nibh ac accumsan molestie, metus diam facilisis lectus, non mollis metus dolor nec urna. Aliquam accumsan tincidunt libero, et blandit diam dictum et. Donec lorem est, vulputate at blandit sit amet, sodales in orci. Donec quis nunc nulla. Nam sollicitudin viverra eleifend. Nulla facilisi. Pellentesque a arcu in tellus imperdiet euismod. Fusce convallis ullamcorper consequat."
}

typograph.start(params, function(err, data){
    if(err == null){
        console.log(data);
    } else {
        console.log(err);
    }
});