papers please citation generator
Find a file
Blockzilla101 51f69231b0 1.1.0
2021-03-14 17:06:32 +05:00
data cleanup / refactor 2021-03-09 17:42:18 +05:00
src tint logo / logo scale 2021-03-14 17:00:26 +05:00
.gitignore cleanup / refactor 2021-03-09 17:42:18 +05:00
index.js cleanup / refactor 2021-03-09 17:42:18 +05:00
package-lock.json update packages 2021-03-09 20:02:17 +05:00
package.json 1.1.0 2021-03-14 17:06:32 +05:00
README.md . 2021-03-14 17:05:45 +05:00

Node.js library to create papers please citations.

Installation

Needs node.js version 15.x.x
Installing with npm npm i --save Blockzilla101/citation
Installing with yarn yarn add Blockzilla101/citation

Usage

const { Citation } = require('citation')
const citation = new Citation()
// Optional: width and height can be set in the constructor too
// new Citation(<width>, <height>)

citation.reason = 'reason'
citation.penalty = 'penalty'
citation.title = 'title'
citation.width = 450
citation.height = 200
citation.barcode = [1, 0, 1, 1, 0, 0, 0, 1] // 0 = dont put a line, 1 = put a line; expands leftwards to fit the barcode
citation.resizeReason = true // whether to truncate the reason instead of expanding to fit it

citation.render('citation.png')
// for a gif
citation.render('citation.gif', true)

render() returns the rendered image or gif as a buffer.