hirnsturm / py-task-runner

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Task Runner

This script runs custom tasks and commands.

Requirements

Installation

  1. Download current version

    // Download with wget
    $ wget https://github.com/hirnsturm/py-task-runner/archive/master.zip -O py-task-runner.zip
    
    // Download with cURL
    $ curl https://github.com/hirnsturm/py-task-runner/archive/master.zip -o py-task-runner.zip
  2. Unzip package

    $ unzip py-task-runner.zip
  3. Create configuration file and configure your tasks and questions

    $ cd py-task-runner
    py-task-runner$ mv taskrunner.yml.dist taskrunner.yml
  4. Define your tasks or commands in taskrunner.yml

Configuration

You can configure your tasks and questions in taskrunner.yml.

Example

#
# Questions
#
questions:
  NAME: 'What´s your name?'
#
# Tasks
#
tasks:
  -
    type: command
    info: 'Run "pwd" command'
    cmd: pwd
  -
    type: replace_placeholder
    info: 'Replace {{NAME}} in ./examples/name.txt'
    file: './examples/name.txt'

Execution

$ python3 taskrunner.py

About

License:MIT License


Languages

Language:Python 100.0%