nncli

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

commit f7f8a7d9ef1c73b81a9195b9eb9fe7e46310f065
parent 305e634a888785c9fdc3b365ca91ab6c309f4af6
Author: Eric Davis <edavis@insanum.com>
Date:   Fri, 11 Jul 2014 16:31:33 -0700

show note flags in cli note list

Diffstat:
Msncli.py | 13++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/sncli.py b/sncli.py @@ -795,7 +795,18 @@ def cli_list_notes(self, search_string): note_list, match_regex, all_notes_cnt = \ self.ndb.filter_notes(search_string) for n in note_list: - print n.key + u' ' + utils.get_note_title(n.note) + note = n.note + if 'systemtags' in note: + flags = '' + if 'pinned' in note['systemtags']: flags = flags + u'*' + else: flags = flags + u' ' + if 'markdown' in note['systemtags']: flags = flags + u'm' + else: flags = flags + u' ' + else: + flags = ' ' + print note['key'] + \ + u' [' + flags + u'] ' + \ + utils.get_note_title(note) def cli_dump_notes(self, search_string, key=None):