nncli

NextCloud Notes Command Line Interface
git clone git://git.danielmoch.com/nncli.git
Log | Files | Refs | LICENSE

commit 41d0d01853face2828fd51515f08257d74bb15c4
parent e6ed698f12ae69be21e0ef963941f72c14b8be5c
Author: Shawn Axsom <shawn.axsom@rooksecurity.com>
Date:   Tue, 26 May 2015 08:06:01 -0400

Don't show GUI logs if not verbose

Diffstat:
Msimplenote_cli/sncli.py | 11+++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/simplenote_cli/sncli.py b/simplenote_cli/sncli.py @@ -46,7 +46,7 @@ def __init__(self, do_server_sync, verbose=False): sys.exit(1) if force_full_sync: - # The note database doesn't exist so force a full sync. Itis + # The note database doesn't exist so force a full sync. It is # important to do this outside of the gui because an account # with hundreds of notes will cause a recursion panic under # urwid. This simple workaround gets the job done. :-) @@ -218,10 +218,12 @@ def log_timeout(self, loop, arg): self.logs.pop(0) log_pile = [] + for l in self.logs: log_pile.append(urwid.AttrMap(urwid.Text(l), 'log')) - self.gui_footer_log_set(log_pile) + if self.verbose: + self.gui_footer_log_set(log_pile) self.log_lock.release() @@ -246,7 +248,8 @@ def log(self, msg): for l in self.logs: log_pile.append(urwid.AttrMap(urwid.Text(l), 'log')) - self.gui_footer_log_set(log_pile) + if self.verbose: + self.gui_footer_log_set(log_pile) self.sncli_loop.set_alarm_in( int(self.config.get_config('log_timeout')), @@ -1136,7 +1139,7 @@ def usage(): OPTIONS: -h, --help - usage help - -v, --verbose - verbose output (cli mode) + -v, --verbose - verbose output -n, --nosync - don't perform a server sync -r, --regex - search string is a regular expression -k <key>, --key=<key> - note key