From 3284113c5b3264741d7c86d7899e40834e7e5940 Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Sun, 15 Aug 2021 14:49:12 +0200 Subject: [PATCH] implement --no-banner for #12 --- catcli/catcli.py | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/catcli/catcli.py b/catcli/catcli.py index b11844a..1faf383 100755 --- a/catcli/catcli.py +++ b/catcli/catcli.py @@ -36,15 +36,15 @@ USAGE = """ {0} Usage: - {1} ls [--catalog=] [-arVS] [] - {1} index [--catalog=] [--meta=...] [-acfnV] - {1} update [--catalog=] [-acfnV] [--lpath=] - {1} find [--catalog=] [-abdVP] [--path=] - {1} rm [--catalog=] [-fV] - {1} tree [--catalog=] [-aVS] [] - {1} rename [--catalog=] [-fV] - {1} edit [--catalog=] [-fV] - {1} graph [--catalog=] [-V] [] + {1} ls [--catalog=] [-aBrVS] [] + {1} index [--catalog=] [--meta=...] [-aBcfnV] + {1} update [--catalog=] [-aBcfnV] [--lpath=] + {1} find [--catalog=] [-aBbdVP] [--path=] + {1} rm [--catalog=] [-BfV] + {1} tree [--catalog=] [-aBVS] [] + {1} rename [--catalog=] [-BfV] + {1} edit [--catalog=] [-BfV] + {1} graph [--catalog=] [-BV] [] {1} help {1} --help {1} --version @@ -52,17 +52,18 @@ Usage: Options: --catalog= Path to the catalog [default: {2}]. --meta= Additional attribute to store [default: ]. - -p --path= Start path. - -l --lpath= Path where changes are logged [default: ] - -n --no-subsize Do not store size of directories [default: False]. -a --archive Handle archive file [default: False]. - -f --force Do not ask when updating the catalog [default: False]. - -d --directory Only directory (default: False). + -B --no-banner Do not display the banner [default: False]. -b --script Output script to manage found file(s) [default: False]. - -S --sortsize Sort by size, largest first [default: False]. -c --hash Calculate md5 hash [default: False]. - -r --recursive Recursive [default: False]. + -d --directory Only directory (default: False). + -f --force Do not ask when updating the catalog [default: False]. + -l --lpath= Path where changes are logged [default: ] + -n --no-subsize Do not store size of directories [default: False]. -P --parent Ignore stored relpath [default: True]. + -p --path= Start path. + -r --recursive Recursive [default: False]. + -S --sortsize Sort by size, largest first [default: False]. -V --verbose Be verbose [default: False]. -v --version Show version. -h --help Show this screen. @@ -232,7 +233,8 @@ def main(): print(args) # print banner - banner() + if not args['--no-banner']: + banner() # init noder noder = Noder(debug=args['--verbose'], sortsize=args['--sortsize'],