Run multiple iterations of commands from a config file
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for clack-1.0.0.dev0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3daae09ab8e5e1907036eb7fe1b18cac4562ee764cc21ec22d92c21865c8b56b |
|
MD5 | 2e3fd154c710d58c4fd7136733d61bd7 |
|
BLAKE2b-256 | cd76378385de4a575e5fbb7b8e88176e1033e1a5b156932892f9c2ca07ab4572 |