Updates README

main
Kushal Das 5 months ago
parent 4d92a08eab
commit 093511b597
Signed by untrusted user who does not match committer: kushaldas
GPG Key ID: C65FF007C75766ED

@ -3,11 +3,15 @@
This is a commandline tool for knotapi: https://gitlab.nic.cz/knot/knot-dns-rest This is a commandline tool for knotapi: https://gitlab.nic.cz/knot/knot-dns-rest
## Build and install ## Build and install
To install using pip, run the following command:
To install using pip, run the following command in a virtual envrionment.
``` ```
pip3 install git+https://code.smolnet.org/micke/knotctl python -m pip install "knotctl @ git+https://code.smolnet.org/micke/knotctl
``` ```
To build and install as a deb-package To build and install as a deb-package
``` ```
sudo apt install python3-stdeb sudo apt install python3-stdeb
git clone https://code.smolnet.org/micke/knotctl git clone https://code.smolnet.org/micke/knotctl
@ -18,25 +22,34 @@ sudo dpkg -i deb_dist/knotctl_*_all.deb
A prebuilt deb-package is also available from the release page: https://code.smolnet.org/micke/knotctl/releases/ A prebuilt deb-package is also available from the release page: https://code.smolnet.org/micke/knotctl/releases/
## Shell completion ## Shell completion
For bash: add this to .bashrc For bash: add this to .bashrc
``` ```
source <(knotctl completion) source <(knotctl completion)
``` ```
For fish, run: For fish, run:
``` ```
knotctl completion --shell fish > ~/.config/fish/completions/knotctl.fish knotctl completion --shell fish > ~/.config/fish/completions/knotctl.fish
``` ```
For tcsh: add this to .cshrc For tcsh: add this to .cshrc
``` ```
complete "knotctl" 'p@*@`python-argcomplete-tcsh "knotctl"`@' ; complete "knotctl" 'p@*@`python-argcomplete-tcsh "knotctl"`@' ;
``` ```
For zsh: add this to .zshrc For zsh: add this to .zshrc
``` ```
autoload -U bashcompinit autoload -U bashcompinit
bashcompinit bashcompinit
source <(knotctl completion) source <(knotctl completion)
``` ```
## Usage ## Usage
``` ```
usage: knotctl [-h] [--json | --no-json] usage: knotctl [-h] [--json | --no-json]
{add,completion,config,delete,list,update} ... {add,completion,config,delete,list,update} ...
@ -48,7 +61,9 @@ options:
-h, --help show this help message and exit -h, --help show this help message and exit
--json, --no-json --json, --no-json
``` ```
### ADD ### ADD
``` ```
usage: knotctl add [-h] -d DATA -n NAME -r RTYPE [-t TTL] -z ZONE usage: knotctl add [-h] -d DATA -n NAME -r RTYPE [-t TTL] -z ZONE
@ -60,7 +75,9 @@ options:
-t TTL, --ttl TTL -t TTL, --ttl TTL
-z ZONE, --zone ZONE -z ZONE, --zone ZONE
``` ```
### COMPLETION ### COMPLETION
``` ```
usage: knotctl completion [-h] [-s SHELL] usage: knotctl completion [-h] [-s SHELL]
@ -68,7 +85,9 @@ options:
-h, --help show this help message and exit -h, --help show this help message and exit
-s SHELL, --shell SHELL -s SHELL, --shell SHELL
``` ```
### CONFIG ### CONFIG
``` ```
usage: knotctl config [-h] [-c CONTEXT] [-b BASEURL] [-p PASSWORD] [-u USERNAME] usage: knotctl config [-h] [-c CONTEXT] [-b BASEURL] [-p PASSWORD] [-u USERNAME]
@ -79,7 +98,9 @@ options:
-p PASSWORD, --password PASSWORD -p PASSWORD, --password PASSWORD
-u USERNAME, --username USERNAME -u USERNAME, --username USERNAME
``` ```
### DELETE ### DELETE
``` ```
usage: knotctl delete [-h] [-d DATA] [-n NAME] [-r RTYPE] -z ZONE usage: knotctl delete [-h] [-d DATA] [-n NAME] [-r RTYPE] -z ZONE
@ -90,7 +111,9 @@ options:
-r RTYPE, --rtype RTYPE -r RTYPE, --rtype RTYPE
-z ZONE, --zone ZONE -z ZONE, --zone ZONE
``` ```
### LIST ### LIST
``` ```
usage: knotctl list [-h] [-d DATA] [-n NAME] [-r RTYPE] [-z ZONE] usage: knotctl list [-h] [-d DATA] [-n NAME] [-r RTYPE] [-z ZONE]
@ -101,7 +124,9 @@ options:
-r RTYPE, --rtype RTYPE -r RTYPE, --rtype RTYPE
-z ZONE, --zone ZONE -z ZONE, --zone ZONE
``` ```
### UPDATE ### UPDATE
``` ```
usage: knotctl update [-h] -a [ARGUMENT ...] -d DATA -n NAME -r RTYPE [-t TTL] usage: knotctl update [-h] -a [ARGUMENT ...] -d DATA -n NAME -r RTYPE [-t TTL]
-z ZONE -z ZONE

Loading…
Cancel
Save