dorpheus-card-generator

Dorpheus Sprint Card PDF Generator

Usage no npm install needed!

<script type="module">
  import dorpheusCardGenerator from 'https://cdn.skypack.dev/dorpheus-card-generator';
</script>

README

dorpheus-card-generator

Creates a html and pdf file from the tickets in the current active sprint.

Usage as a library

index.js exports a single method called jiraToPdf() which takes a properties object, and responds with a html-pdf CreateResult.

The CreateResult can be converted to a buffer with toBuffer, or to a file with toFile.

For example;

function getJiraPdfAsBuffer(props: IProperties) {
    return jiraToPdf(props)
        .then((createResult) => {
            return new Promise<Buffer>((resolve, reject) =>
                createResult.toBuffer((err, buffer) =>
                    buffer && resolve(buffer) || reject(err);));
        });
}

Running as Standalone

To run as a standalone application;

$ npm i
$ npm run build
$ npm run start
    # Do something with out.pdf/out.html

The standalone application depends on the following properties being defined in your ~/.gradle/gradle.properties

$ cat ~/.gradle/gradle.properties
jiraUrl=https://org.atlassian.net
jiraUsername=user@org.com
jiraPassword=hunter12
jiraBoardId=123