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
File details
Details for the file clack-1.1.0.tar.gz
.
File metadata
- Download URL: clack-1.1.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5417c0efd82fa46b6992ca7779eda09fc6d6db507dd9387ee42d71bc76301c65 |
|
MD5 | 32af805a0046eda5a2e85d79c3beda2c |
|
BLAKE2b-256 | 06f8a1c117ce0dcd6ae67ab6096b96b529035448609cf44a760a6d22fae8dcbd |
File details
Details for the file clack-1.1.0-py2-none-any.whl
.
File metadata
- Download URL: clack-1.1.0-py2-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f481711a47ff2e5ddb82d434eee06ba64af992a0aad034d073b32d867781f9cb |
|
MD5 | 3e4a0f1164efc6ed7d7d0fc5997262f2 |
|
BLAKE2b-256 | 8523e04328813f7af8df9266487e191d1721a67970e40a1ab26f4180413c9242 |