nncli

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

commit 6c68d6869a7a6344e17850a490e11ecdb6db9ca7
parent 95ce5541b9c1bdd559175c57e51155ba13c087c7
Author: Eric Davis <edavis@insanum.com>
Date:   Tue,  1 Jul 2014 19:56:18 -0700

added flags to the view note status bar

Diffstat:
Mview_note.py | 10+++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/view_note.py b/view_note.py @@ -47,11 +47,15 @@ def get_status_bar(self): mod_time, wrap='clip'), 'status_bar') - status_tags = \ - ('pack', urwid.AttrMap(urwid.Text(u'[' + tags + u']'), + flags = '' + if self.note.has_key("systemtags"): + if 'pinned' in self.note['systemtags']: flags = flags + u'*' + if 'markdown' in self.note['systemtags']: flags = flags + u'm' + status_tags_flags = \ + ('pack', urwid.AttrMap(urwid.Text(u'[' + tags + u'] [' + flags + u']'), 'status_bar')) pile_top = urwid.Columns([ status_title, status_index ]) - pile_bottom = urwid.Columns([ status_date, status_tags ]) + pile_bottom = urwid.Columns([ status_date, status_tags_flags ]) return \ urwid.AttrMap(urwid.Pile([ pile_top, pile_bottom ]), 'status_bar')