Skip to main content

Run multiple iterations of commands from a config file

Project description

clack on PyPI clack on PyPI Documentation for clack on Read The Docs Travis-CI build status for clack GitHub issues for clack

Run multiple iterations of the same command from a stored configuration.

I build this to help with building multiple packages using fpm. I had a set of commands where it was useful to share default and common arguments for each package, and the commands were complex enough that I wanted a configuration file describing them (and generic functions are painful in make). An example of using clack with fpm can be found in examples/fpm.json.

Usage

Create a configuration file:

{
    "default": {
        "command": "cowsay",
        "options": { "-f": "default" }
    },
    "iterations": [
        {
            "arguments": ["moo"]
        },
        {
            "arguments": ["baa"],
            "options": { "-f": "sheep" }
        }
    ]
}

Then run clack on the file:

clack examples/farm.json

And the result:

 _____
< moo >
 -----
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
 _____
< baa >
 -----
  \
   \
       __
      UooU\.'@@@@@@`.
      \__/(@@@@@@@@@@)
           (@@@@@@@@)
           `YY~~~~YY'
            ||    ||

Installation

Install clack with pip or pipsi.

pip install clack

Licence

clack is licensed under the MIT Licence.

Authors

clack was written by Sam Clements.

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

clack-1.0.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

clack-1.0.0-py2-none-any.whl (7.4 kB view details)

Uploaded Python 2

File details

Details for the file clack-1.0.0.tar.gz.

File metadata

  • Download URL: clack-1.0.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for clack-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ba90f88ceb6bfba98dc3f049e56e792f5843b3c399cfc11f78c26e0c8d6f6b07
MD5 c6b489600c0e63f06c0efb0c84a60219
BLAKE2b-256 2f5fb2e2ec500e929fa057af1c552d7ab5c5c15201c3fadf26af7fa147dfe6f7

See more details on using hashes here.

File details

Details for the file clack-1.0.0-py2-none-any.whl.

File metadata

File hashes

Hashes for clack-1.0.0-py2-none-any.whl
Algorithm Hash digest
SHA256 9311f645ab3a2d16c8c850a5349ad33d7a062f16214fb651c22842c138a9de88
MD5 962dedb1d86b2086717ee166dbf72992
BLAKE2b-256 75bd301aa61bf9335c55365d8e1ed7cdf3d3f1705c0cdb452e5e256d329dcaa8

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