nncli

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

commit bcce0d9ca8859e8113b9db36dfc00a3063aac0b6
parent 8f1ce9fcd6dd3e032c0db59ae25331bbe9abf4bf
Author: Eric Davis <edavis@insanum.com>
Date:   Tue, 15 Jul 2014 13:18:16 -0700

added a new flag 'X' that specifies a note is not synced with the server

Diffstat:
Mutils.py | 7+++++++
Mview_titles.py | 2+-
2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/utils.py b/utils.py @@ -24,8 +24,15 @@ def get_note_tags(note): tags = u'' return tags +# Returns a fixed length string: +# 'X' - needs sync +# 'T' - trashed +# '*' - pinned +# 'S' - published/shared +# 'm' - markdown def get_note_flags(note): flags = '' + flags += u'X' if float(note['modifydate']) > float(note['syncdate']) else u' ' flags += u'T' if 'deleted' in note and note['deleted'] else u' ' if 'systemtags' in note: flags += u'*' if 'pinned' in note['systemtags'] else u' ' diff --git a/view_titles.py b/view_titles.py @@ -37,7 +37,7 @@ def format_title(self, note): specifier (decimal) and a left justification (-) like that supported by printf. - %F -- flags ('T' for trashed, '*' for pinned, 'm' for markdown) + %F -- flags %T -- tags %D -- date %N -- note title