From 1461d12f4b775290b52d50ccbca92e3242fc6382 Mon Sep 17 00:00:00 2001 From: Micke Nordin Date: Tue, 25 Oct 2022 08:44:19 +0200 Subject: [PATCH] Add build instructions --- README.md | 54 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index b9bfd6e..90ea704 100644 --- a/README.md +++ b/README.md @@ -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]