jirafs-mermaid

Automatically include diagrams and charts generated with mermaid in your Jira issues.


License
MIT
Install
pip install jirafs-mermaid==1.0.2

Documentation

Jirafs-Mermaid

Automatically converts mermaid chart definitions into images that will be uploaded in-place to Jira on your behalf.

Use

You can enter a mermaid diagram into your document by using the mermaid macro:

<jirafs:mermaid>
 sequenceDiagram
     Alice->>John: Hello John, how are you?
     John-->>Alice: Great!
</jirafs:mermaid>

or:

<jirafs:mermaid src="name-of-mermaid-file.mmd" />

Upon submission to Jira, a file will automatically be generated, and your markup will be replaced with an embedded image showing your rendered image.

Options

You can control the type and characteristics of the image generated by specifying any of the following attributes:

  • src: Use the referenced file for your mermaid digram's contents. Note that this cannot be specified if digram contents are specified directly in your tag's contents.
  • theme: (Default: 'default') Which mermaid theme to use. See mermaid.cli -h for what versions your version of mermaid supports.
  • format: (Default: png) File format to generate.

Installation

  1. Install from PIP:

    pip install jirafs-mermaid
    
  2. Enable for a ticket folder:

    jirafs plugins --enable=mermaid
    

Note that you can globally enable this (or any) plugin by adding the --global flag to the above command:

jirafs plugins --global --enable=mermaid

Requirements