From 6bb959a4e710fa2ca7063f905e44311cfe5eee8b Mon Sep 17 00:00:00 2001 From: kamangir Date: Sun, 24 Nov 2024 19:57:13 -0800 Subject: [PATCH] @help @cat - kamangir/bolt#746 --- README.md | 2 +- abcli/.abcli/tests/help.sh | 2 ++ abcli/__init__.py | 2 +- abcli/help/functions.py | 8 +++++--- abcli/help/{log.py => logging.py} | 14 ++++++++++++++ 5 files changed, 23 insertions(+), 5 deletions(-) rename abcli/help/{log.py => logging.py} (75%) diff --git a/README.md b/README.md index 8f0365b8..805af7b1 100644 --- a/README.md +++ b/README.md @@ -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.165.1`](https://github.com/kamangir/awesome-bash-cli), based on 🪄 [`abcli-9.428.1`](https://github.com/kamangir/awesome-bash-cli). +built by 🌀 [`blue_options-4.166.1`](https://github.com/kamangir/awesome-bash-cli), based on 🪄 [`abcli-9.429.1`](https://github.com/kamangir/awesome-bash-cli). diff --git a/abcli/.abcli/tests/help.sh b/abcli/.abcli/tests/help.sh index ac0906a5..5e30914e 100644 --- a/abcli/.abcli/tests/help.sh +++ b/abcli/.abcli/tests/help.sh @@ -15,6 +15,8 @@ function test_abcli_help() { \ "@browse" \ \ + "@cat" \ + \ "@docker browse " \ "@docker build " \ "@docker clear " \ diff --git a/abcli/__init__.py b/abcli/__init__.py index bdd2477d..66245b00 100644 --- a/abcli/__init__.py +++ b/abcli/__init__.py @@ -6,7 +6,7 @@ DESCRIPTION = f"{ICON} a language to speak AI." -VERSION = "9.428.1" +VERSION = "9.429.1" REPO_NAME = "awesome-bash-cli" diff --git a/abcli/help/functions.py b/abcli/help/functions.py index 3eae0e7b..206106f8 100644 --- a/abcli/help/functions.py +++ b/abcli/help/functions.py @@ -12,7 +12,8 @@ from abcli.help.gpu import help_functions as help_gpu from abcli.help.init import help_init from abcli.help.latex import help_functions as help_latex -from abcli.help.log import help_functions as help_log +from abcli.help.logging import help_cat +from abcli.help.logging import help_functions as help_log from abcli.help.metadata import help_functions as help_metadata from abcli.help.mlflow import help_functions as help_mlflow from abcli.help.notebooks import help_functions as help_notebooks @@ -37,11 +38,10 @@ help_functions.update( { - "source_caller_suffix_path": help_source_caller_suffix_path, - "source_path": help_source_path, "aws_batch": help_aws_batch, "badge": help_badge, "browse": help_browse, + "cat": help_cat, "cp": help_cp, "docker": help_docker, "download": help_download, @@ -63,6 +63,8 @@ "sagemaker": help_sagemaker, "seed": help_seed, "sleep": help_sleep, + "source_caller_suffix_path": help_source_caller_suffix_path, + "source_path": help_source_path, "terraform": help_terraform, "upload": help_upload, "watch": help_watch, diff --git a/abcli/help/log.py b/abcli/help/logging.py similarity index 75% rename from abcli/help/log.py rename to abcli/help/logging.py index c88b1d0f..3647b207 100644 --- a/abcli/help/log.py +++ b/abcli/help/logging.py @@ -3,6 +3,20 @@ from blue_options.terminal import show_usage, xtra +def help_cat( + tokens: List[str], + mono: bool, +) -> str: + return show_usage( + [ + "@cat", + "", + ], + "cat .", + mono=mono, + ) + + def help_log( tokens: List[str], mono: bool,