Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kamangir committed Nov 4, 2024
1 parent 31388ae commit f08eb9d
Show file tree
Hide file tree
Showing 5 changed files with 163 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ create a copy of [`sample.env`](./abcli/sample.env) as `.env` and fill in the se

[![pylint](https://github.com/kamangir/awesome-bash-cli/actions/workflows/pylint.yml/badge.svg)](https://github.com/kamangir/awesome-bash-cli/actions/workflows/pylint.yml) [![pytest](https://github.com/kamangir/awesome-bash-cli/actions/workflows/pytest.yml/badge.svg)](https://github.com/kamangir/awesome-bash-cli/actions/workflows/pytest.yml) [![bashtest](https://github.com/kamangir/awesome-bash-cli/actions/workflows/bashtest.yml/badge.svg)](https://github.com/kamangir/awesome-bash-cli/actions/workflows/bashtest.yml) [![PyPI version](https://img.shields.io/pypi/v/abcli.svg)](https://pypi.org/project/abcli/) [![PyPI - Downloads](https://img.shields.io/pypi/dd/abcli)](https://pypistats.org/packages/abcli)

built by 🌀 [`blue_options-4.148.1`](https://github.com/kamangir/awesome-bash-cli), based on 🪄 [`abcli-9.394.1`](https://github.com/kamangir/awesome-bash-cli).
built by 🌀 [`blue_options-4.148.1`](https://github.com/kamangir/awesome-bash-cli), based on 🪄 [`abcli-9.395.1`](https://github.com/kamangir/awesome-bash-cli).
9 changes: 9 additions & 0 deletions abcli/.abcli/tests/help.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ function test_abcli_help() {

local module
for module in \
"@docker browse " \
"@docker build " \
"@docker clear " \
"@docker eval " \
"@docker push " \
"@docker run " \
"@docker seed " \
"@docker source " \
\
"@git" \
"@git browse" \
"@git checkout" \
Expand Down
2 changes: 1 addition & 1 deletion abcli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

DESCRIPTION = f"{ICON} a language to speak AI."

VERSION = "9.394.1"
VERSION = "9.395.1"

REPO_NAME = "awesome-bash-cli"

Expand Down
150 changes: 150 additions & 0 deletions abcli/help/docker.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
from typing import List

from blue_options.terminal import show_usage, xtra


def help_browse(
tokens: List[str],
mono: bool,
) -> str:
options = xtra("~public", mono=mono)

return show_usage(
[
"@docker",
"browse",
f"[{options}]",
],
"browse docker-hub.",
mono=mono,
)


def help_build(
tokens: List[str],
mono: bool,
) -> str:
options = xtra("dryrun,no_cache,~push,run,verbose", mono=mono)

return show_usage(
[
"@docker",
"build",
f"[{options}]",
],
"build the abcli docker image.",
mono=mono,
)


def help_clear(
tokens: List[str],
mono: bool,
) -> str:
return show_usage(
[
"@docker",
"clear",
],
"clear docker.",
mono=mono,
)


def help_eval(
tokens: List[str],
mono: bool,
) -> str:
options = xtra("cat,dryrun,verbose", mono=mono)

return show_usage(
[
"@docker",
"eval",
f"[{options}]",
"<command-line>",
],
"run <command-line> through the abcli docker image.",
mono=mono,
)


def help_push(
tokens: List[str],
mono: bool,
) -> str:
options = "actions|repo"

return show_usage(
[
"@docker",
"push",
],
"push the abcli docker image.",
mono=mono,
)


def help_run(
tokens: List[str],
mono: bool,
) -> str:
options = xtra("dryrun", mono=mono)

return show_usage(
[
"@docker",
"run",
f"[{options}]",
],
"run abcli docker image.",
mono=mono,
)


def help_seed(
tokens: List[str],
mono: bool,
) -> str:
options = "actions|repo"

return show_usage(
[
"@plugin",
"browse",
f"[{options}]",
],
"browse blue_plugin.",
mono=mono,
)


def help_source(
tokens: List[str],
mono: bool,
) -> str:
options = xtra("cat,dryrun,verbose", mono=mono)

return show_usage(
[
"@docker",
"source",
f"[{options}]",
"<script-name>",
"[<args>]",
],
"source <script-name> <args> through the abcli docker image.",
mono=mono,
)


help_functions = {
"browse": help_browse,
"build": help_build,
"clear": help_clear,
"eval": help_eval,
"push": help_push,
"run": help_run,
"seed": help_seed,
"source": help_source,
}
2 changes: 2 additions & 0 deletions abcli/help/functions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from abcli.help.cp import help_cp
from abcli.help.docker import help_functions as help_docker
from abcli.help.download import help_download
from abcli.help.gif import help_gif
from abcli.help.git import help_functions as help_git
Expand All @@ -15,6 +16,7 @@

help_functions = {
"cp": help_cp,
"docker": help_docker,
"download": help_download,
"gif": help_gif,
"git": help_git,
Expand Down

0 comments on commit f08eb9d

Please sign in to comment.