Skip to main content

Jira does not provide a nice printable layout for tickets and nicer printing options are costly. This script just wraps the jira-api to allow formatting using jinja2 templates. This way, tickets can easily be formatted in a printer friendly way.

Getting started

The jiraprinter works on python3 only.

Jiraprinter is on pypi, so you can simply run

pip install jiraprinter

To install it. This will also create the two commands jira.py and prepare_token used below.

You can run the command line tool by calling

$ jira.py export <Ticket-Id> [<Ticket-Id> ...]

Here, angle brackets (<>) denote variable parameters and square brackets ([]) denote optional parameters. This is similar to unix man pages. You can start the web-interface for selecting tickets and printing them by calling

$ jira.py select

The web-interface will then be available at localhost:8080.

Setting your credentials

It is recommended that you put the URL of your jira server as well as your credentials into separate environment variables. Your user credentials need to be passed in base 64 encoding, which can be done using the prepare_token.py script:

$ prepare_token.py
Please enter your jira user name: myname
Please enter your jira password:
fowkeofoakjdfolai

That last name is your jira credentials in base 64 encoding. It is recommended that you set your jira credentials and the url of the server in your bashrc (if you use bash). To do so, add the following lines to your ~/.bashrc file.

export JIRAURL=https://jira.mycompany/rest/api/2
export JIRACREDENTIALS=fowkeofoakjdfolai

Obviously, both the URL and the credentials are completely made up.

Authentication error

Error messages are typically rather long and complex. If you see a 401 status code somewhere at the end of the stacktrace, that means that you’re not correctly authenticated. In that case, you might want to check your user name and password.

Travis

Test status on current master: build status

Metadata

Release files for jiraprinter 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jiraprinter 0.0.1
File Size Uploaded
jiraprinter-0.0.1.tar.gz 4.3 kB Details

Release files / jiraprinter-0.0.1.tar.gz

Download URL jiraprinter-0.0.1.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
373248e69515a0615500d5292dd582af1c6eea524262e75d0c06bbce202b3192
BLAKE2b-256 checksum
How to use checksums
66a907660d3c7847d5b1ce60a55b8e2b998303a656804f945c8cfe174e709c14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file

0.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page