Skip to main content

Template engine for (currently) Jira and Email. Uses yaml and jinja2. It helps you create multiple (possibly cross-linked) jira issues and emails from a template.

Project description

Intro

Template engine for (currently) Jira and Email. Uses yaml and jinja2. It helps you create multiple (possibly cross-linked) jira issues and emails from a template.

Table of Contents

Installation

Windows

  1. Download Workflow_Templater_${version}.exe from the latest release on Releases page.
  2. Install it.
  3. Now workflow-templater executable should be available from Windows Command Prompt (cmd.exe).

macOS

  1. Install python ≥ 3.7.
    • Using official Python installer:
      1. Install python ≥ 3.7 from https://python.org/ ("macOS 64-bit installer")
      2. Install CA certificates for python, execute in Terminal:
        /Applications/Python\ 3.7/Install\ Certificates.command
        
        Alternatively, you can double-click on Install Certificates.command in Finder
    • Or using Homebrew:
      brew install python
      
  2. pip3 install workflow-templater
    

Anything else (GNU/Linux, Cygwin, *nix, etc)

Using pip

  1. Make sure that python ≥ 3.7 is installed
  2. pip3 install workflow-templater
    

Using eggsecutable

  1. Download workflow_templater-${version}-py3.x.egg from the latest release on Releases page.
  2. You can execute it directly or with /bin/sh (if you have compatible python and dependencies installed):
    ./workflow_templater-${version}-py3.x.egg --help
    sh ./workflow_templater-${version}-py3.x.egg --help
    

From source

  1. Clone this repo
  2. Install dependencies if required
    pip3 install -r requirements.txt
    
  3. You can execute the script directly:
    cd workflow_templater
    ./workflow_templater/__init__.py --help
    
    Or install/build/whatever it with
    python3 setup.py
    

Usage

See

workflow-templater --help

Configuration

To avoid typing same command line arguments each time, it is possible to specify them in configuration file. Configuration file location is OS-specific, to find out correct location for your os, execute workflow-templater --help, you'll see message "--config CONFIG overwrite config file path, default is ${location}" where ${location} is the location of configuration file on your OS. You can create this file and specify values of command-line arguments omitting -- and replacing - with _, for example, --jira-user j_wayne becomes jira_user: j_wayne, --dry-run becomes dry_run: true and so on. You can also use jinja2 in configuration file which evaluates using variables from itself.

Example ~/.config/workflow-templater/config.yaml:

dry_run: true
verbose: true
user: j_wayne
jira: https://jira.example.com/
jira_user: '{{ user }}'
email_user: '{{ user }}'
email_from: '{{ user }}@example.com'
email_smtp: 'smtp.example.com:587'
# avoid typing in the same password for jira and email
jira_keyring_service_name: 'MyCorp LDAP'
email_keyring_service_name: 'MyCorp LDAP'

Template description

Overview

  • Whole workflow template is a directory.
  • There should be one file with variables named 0_common.yaml, 00_common.yaml or common.yaml.
  • There may be any amount of "issue" files: ending with ".jira.yaml" for jira issue and ending with ".email.yaml" for email.
  • Each "issue" file is yaml file where each string value is rendered with Jinja2 using variables from *common.yaml file.

Examples

See basic release example for basic example.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

workflow_templater-0.1.1.tar.gz (9.5 kB view details)

Uploaded Source

Built Distributions

workflow_templater-0.1.1-py3.7.egg (10.1 kB view details)

Uploaded Source

workflow_templater-0.1.1-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file workflow_templater-0.1.1.tar.gz.

File metadata

  • Download URL: workflow_templater-0.1.1.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.1

File hashes

Hashes for workflow_templater-0.1.1.tar.gz
Algorithm Hash digest
SHA256 bcf05de41c217ca4fecda48adb8a91e502977ad06e69c638ae7040120953dafb
MD5 31e410d807e3c9ce0ef974b5e23e0adc
BLAKE2b-256 5991f46462f435cf14553cc3a0956792031ff6f144184b634ed6c53d3a9db067

See more details on using hashes here.

File details

Details for the file workflow_templater-0.1.1-py3.7.egg.

File metadata

  • Download URL: workflow_templater-0.1.1-py3.7.egg
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.1

File hashes

Hashes for workflow_templater-0.1.1-py3.7.egg
Algorithm Hash digest
SHA256 b2fdf98fc8e56c099652e74bf51d95f4bd78685a5a2fd96929093653c0498f4a
MD5 1e77b2c5693be1919e3ec37cf32588c2
BLAKE2b-256 fdd7f414a3c4be3bcb4232e953daf598098fbd2aec6e39a2ac303d7dc7398cd2

See more details on using hashes here.

File details

Details for the file workflow_templater-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: workflow_templater-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.1

File hashes

Hashes for workflow_templater-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1801ec4ab65b0905934f535a336ef45b04f0b95473f7644923957d1742bc8886
MD5 b8b2cee332dab2a136ab168e197cf48d
BLAKE2b-256 0146759bdce0d358529e9d3c65b745e96b8283662b49b9adf75cc8c972bdb3c4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page