A simple CLI to run ASP Chef recipes
Project description
ASP Chef CLI
A simple CLI to run ASP Chef, in headed or headless mode.
Install
The suggested way is via pip:
$ pip install asp-chef-cli
$ playwright install
Docker is another option (headed mode needs extra parameters):
$ docker run malvi/asp-chef-cli
$ docker run --net=host --env="DISPLAY" --volume="$HOME/.Xauthority:/root/.Xauthority:rw" malvi/asp-chef-cli
Usage
Run with one of the following commands:
$ python -m asp_chef_cli --help
$ docker run malvi/asp-chef-cli --help
Add the recipe (an ASP Chef sharable URL) with the option --url
(quote the URL as it contains characters like # that breaks bash and other terminals).
The headless mode can be activated with the flag --headless
(always active in the docker image).
Possibly change the default browser used by playwright with the option --browser
.
Finally, give a command to execute:
run
simply runs the recipe as it is;run-with
runs the recipe with the input replaced by the one specified either with the option--input
or via the prompt.
The flag --help
can be specified after a command to get a list of arguments for that command.
Examples
Let us consider this simple recipe with no input and guessing the atom world
.
The recipe can be run headless by giving the following command:
$ python -m asp_chef_cli --headless --browser=chromium --url="https://asp-chef.alviano.net/#eJxtkNuOgjAQhl+plNUsl4srUKIQEXu6s+Ch2CIJIpan33bdRC/2ajKnf/75DibtRBt69QLNiUGSbkfJyawRsFAUqqFKMEBNpxl5TNz1YvzXC7w6ee5xHfUV3PWoTRWDauRbq+X3ck82MpfpJf/ePXhZGS6Bn+mltyo3MGvYLS8Z5AsAGVzOuN5AppGtr+Vqkd6rGBtGi07AD6dRchIZBk+nkgQXbr0gOUrhh2BPgqEyaH4w6VTHwfjuldFwFMlF5m1hauL8ZVfhV69cn9We1Ff3w7r5Gu1dW38op4famy/8tOcJGH5vtfjGNDaouRo3x4iaOF2/aT1ZURhNFGZ30Wag0pFlW0z/8vNDw0nRMRgBxwup4Mh0NPGSAep9OgaW5flOIR4YdD8XRxuHOsbDizkOjtgLfgC4qpvc%21" run
EMPTY MODEL
§
world.
It is possible to specify a different input as follows:
$ python -m asp_chef_headless --headless --browser=chromium --url="https://asp-chef.alviano.net/#eJxtkNuOgjAQhl+plNUsl4srUKIQEXu6s+Ch2CIJIpan33bdRC/2ajKnf/75DibtRBt69QLNiUGSbkfJyawRsFAUqqFKMEBNpxl5TNz1YvzXC7w6ee5xHfUV3PWoTRWDauRbq+X3ck82MpfpJf/ePXhZGS6Bn+mltyo3MGvYLS8Z5AsAGVzOuN5AppGtr+Vqkd6rGBtGi07AD6dRchIZBk+nkgQXbr0gOUrhh2BPgqEyaH4w6VTHwfjuldFwFMlF5m1hauL8ZVfhV69cn9We1Ff3w7r5Gu1dW38op4famy/8tOcJGH5vtfjGNDaouRo3x4iaOF2/aT1ZURhNFGZ30Wag0pFlW0z/8vNDw0nRMRgBxwup4Mh0NPGSAep9OgaW5flOIR4YdD8XRxuHOsbDizkOjtgLfgC4qpvc%21" run-with --input "hello."
hello.
§
hello.
world.
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 asp_chef_cli-0.4.2.tar.gz
.
File metadata
- Download URL: asp_chef_cli-0.4.2.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.8.0-35-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | afe8331eb06371ed223b7c7e815c2df091bb7003dc58b97a9c44173c9c683342 |
|
MD5 | cd6af3258031f60e2eb6dcb8da2a3499 |
|
BLAKE2b-256 | bf2d323ed6096c256a2128259757b596728f6c8dc34a92e6b52d470ab477ef42 |
File details
Details for the file asp_chef_cli-0.4.2-py3-none-any.whl
.
File metadata
- Download URL: asp_chef_cli-0.4.2-py3-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.8.0-35-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fc39f985d46ef24cfae4f54da5602b4760b61ab3053e4f850abb8171f7af700 |
|
MD5 | 0355424fb6bdf24a973ebb9e0d8bb68c |
|
BLAKE2b-256 | 93a5e50028716e3f7e04a8520d16b53bffd6a877a574312037f25edab9e3f83e |