Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Blockzilla101/citation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

59 Commits

Repository files navigation

Node.js library to create papers please citations.

Installation

Needs node.js version ^19.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.

Output

514702888-d958099e-52db-415c-8c12-55193f49573f 514702890-34095a61-1e79-4bc8-a792-198b5c14ace6

About

papers please citation generator

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

AltStyle によって変換されたページ (->オリジナル) /