Skip to content

Commit

Permalink
Add usage instructions (#13)
Browse files Browse the repository at this point in the history
* Add usage instructions

* Add usage in gif

* Add NO_COLOR usage in README.md

* Update README description and keencli.gif

* Add badges and help info for format flag

* Skip markdownlint ```Inline HTML``` errors
  • Loading branch information
tolkonepiu authored Oct 9, 2023
1 parent 1cd4aeb commit 1f0bdd5
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 6 deletions.
35 changes: 34 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,33 @@
<!-- markdownlint-disable -->
<div align='center'>
<!-- markdownlint-enable -->

# keencli

Bash script to control Keenetic routers via HTTP API.
Bash script to control Keenetic routers via HTTP API

[
![version](https://img.shields.io/github/v/release/tolkonepiu/keencli?label=version)
](https://github.com/tolkonepiu/keencli/releases/latest)
[
![license](https://img.shields.io/github/license/tolkonepiu/keencli)
](LICENSE)
[
![linters](https://github.com/tolkonepiu/keencli/actions/workflows/linters.yml/badge.svg?branch=main)
](https://github.com/tolkonepiu/keencli/actions/workflows/linters.yml?query=branch%3Amain)
[
![tests](https://github.com/tolkonepiu/keencli/actions/workflows/tests.yml/badge.svg?branch=main)
](https://github.com/tolkonepiu/keencli/actions/workflows/tests.yml?query=branch%3Amain)

---

[![keencli](keencli.gif)](https://asciinema.org/a/612771?autoplay=1)

---

<!-- markdownlint-disable -->
</div>
<!-- markdownlint-enable -->

## Requirements

Expand Down Expand Up @@ -55,6 +82,12 @@ To turn on debugging output:
DEBUG=1 keencli <command> <subcommand>
```

To turn off color output:

```sh
NO_COLOR=1 keencli <command> <subcommand>
```

## Development

keencli uses [bashly](https://github.com/DannyBen/bashly/) for generating
Expand Down
10 changes: 5 additions & 5 deletions keencli
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ keencli_request_usage() {

# :flag.usage
printf " %s\n" "--format, -f FORMAT"
printf "\n"
printf " Output format type\n"
printf " Allowed: json, yaml, xml, props\n"
echo

Expand Down Expand Up @@ -213,7 +213,7 @@ keencli_show_system_usage() {

# :flag.usage
printf " %s\n" "--format, -f FORMAT"
printf "\n"
printf " Output format type\n"
printf " Allowed: json, yaml, xml, props\n"
printf " Default: yaml\n"
echo
Expand Down Expand Up @@ -270,7 +270,7 @@ keencli_show_interface_usage() {

# :flag.usage
printf " %s\n" "--format, -f FORMAT"
printf "\n"
printf " Output format type\n"
printf " Allowed: json, yaml, xml, props\n"
printf " Default: yaml\n"
echo
Expand Down Expand Up @@ -365,7 +365,7 @@ keencli_show_ip_hotspot_usage() {

# :flag.usage
printf " %s\n" "--format, -f FORMAT"
printf "\n"
printf " Output format type\n"
printf " Allowed: json, yaml, xml, props\n"
printf " Default: yaml\n"
echo
Expand Down Expand Up @@ -421,7 +421,7 @@ keencli_show_internet_usage() {

# :flag.usage
printf " %s\n" "--format, -f FORMAT"
printf "\n"
printf " Output format type\n"
printf " Allowed: json, yaml, xml, props\n"
printf " Default: yaml\n"
echo
Expand Down
Binary file added keencli.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/bashly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ commands:
- long: --format
short: -f
arg: format
help: Output format type
allowed:
- json
- yaml
Expand Down Expand Up @@ -82,6 +83,7 @@ commands:
long: --format
short: -f
arg: format
help: Output format type
default: yaml
allowed:
- json
Expand Down

0 comments on commit 1f0bdd5

Please sign in to comment.