From e030d60a7c9226253977f17311ac47a016723096 Mon Sep 17 00:00:00 2001 From: kamangir Date: Fri, 1 Nov 2024 18:56:45 -0700 Subject: [PATCH] help++ - kamangir/bolt#746 --- README.md | 2 +- abcli/__init__.py | 2 +- abcli/help/cp.py | 21 +++++++++++++++++++++ abcli/help/download.py | 23 +++++++++++++++++++++++ abcli/help/functions.py | 4 ++++ 5 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 abcli/help/cp.py create mode 100644 abcli/help/download.py diff --git a/README.md b/README.md index c88419b1..5a09b010 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.148.1`](https://github.com/kamangir/awesome-bash-cli), based on 🪄 [`abcli-9.379.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.380.1`](https://github.com/kamangir/awesome-bash-cli). diff --git a/abcli/__init__.py b/abcli/__init__.py index 8004cef2..941e824e 100644 --- a/abcli/__init__.py +++ b/abcli/__init__.py @@ -6,7 +6,7 @@ DESCRIPTION = f"{ICON} a language to speak AI." -VERSION = "9.379.1" +VERSION = "9.380.1" REPO_NAME = "awesome-bash-cli" diff --git a/abcli/help/cp.py b/abcli/help/cp.py new file mode 100644 index 00000000..54fb7081 --- /dev/null +++ b/abcli/help/cp.py @@ -0,0 +1,21 @@ +from typing import List + +from blue_options.terminal import show_usage, xtra + + +def help_cp( + tokens: List[str], + mono: bool, +) -> str: + options = "cp,~download,~relate,~tags,upload" + + return show_usage( + [ + "@cp", + f"[{options}]", + "[..|]", + "[.|]", + ], + "copy -> .", + mono=mono, + ) diff --git a/abcli/help/download.py b/abcli/help/download.py new file mode 100644 index 00000000..b13ba0ca --- /dev/null +++ b/abcli/help/download.py @@ -0,0 +1,23 @@ +from typing import List + +from blue_options.terminal import show_usage, xtra + + +def help_download( + tokens: List[str], + mono: bool, +) -> str: + options = "filename=" + + open_options = "open,QGIS" + + return show_usage( + [ + "@download", + f"[{options}]", + "[.|]", + f"[{open_options}]", + ], + "download object.", + mono=mono, + ) diff --git a/abcli/help/functions.py b/abcli/help/functions.py index de60e2f7..f58a4cd2 100644 --- a/abcli/help/functions.py +++ b/abcli/help/functions.py @@ -2,6 +2,8 @@ from blue_options.terminal import show_usage, xtra +from abcli.help.cp import help_cp +from abcli.help.download import help_download from abcli.help.git import help_functions as help_git from abcli.help.log import help_functions as help_log from abcli.help.notebooks import help_functions as help_notebooks @@ -9,6 +11,8 @@ help_functions = { + "cp": help_cp, + "download": help_download, "git": help_git, "log": help_log, "notebooks": help_notebooks,