Add build instructions

pull/7/head
Micke Nordin 2 years ago
parent 536e327bb5
commit 1461d12f4b
Signed by: micke
GPG Key ID: 0DA0A7A5708FE257

@ -1,9 +1,38 @@
# knotctl
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
To install using pip, run the following command:
```
pip3 install git+https://code.smolnet.org/micke/knotctl
```
To build and install as a deb-package
```
git clone https://code.smolnet.org/micke/knotctl
cd knotctl
python3 setup.py --command-packages=stdeb.command bdist_deb
sudo dpkg -i deb_dist/knotctl_0.0.1-1_all.deb
```
## Shell completion
For bash: add this to .bashrc
```
source <(knotctl complete)
```
For fish, run:
```
knotctl complete --shell fish > ~/.config/fish/completions/knotctl.fish
```
For tcsh: add this to .cshrc
```
complete "knotctl" 'p@*@`python-argcomplete-tcsh "knotctl"`@' ;
```
For zsh: add this to .zshrc
```
autoload -U bashcompinit
bashcompinit
source <(knotctl complete)
```
## Usage
```
usage: knotctl [-h] [--json | --no-json]
@ -36,25 +65,6 @@ options:
-h, --help show this help message and exit
-s SHELL, --shell SHELL
```
For bash: add this to .bashrc
```
source <(knotctl complete)
```
For fish, run:
```
knotctl complete --shell fish > ~/.config/fish/completions/knotctl.fish
```
For tcsh: add this to .cshrc
```
complete "knotctl" 'p@*@`python-argcomplete-tcsh "knotctl"`@' ;
```
For zsh: add this to .zshrc
```
autoload -U bashcompinit
bashcompinit
source <(knotctl complete)
```
### CONFIG
```
usage: knotctl config [-h] [-b BASEURL] [-p PASSWORD] [-u USERNAME]

Loading…
Cancel
Save