-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
163 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters