nncli

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

commit adaf59a0cbd429707768d8148dab882343f9d765
parent 37a7bef4a8fde168f4882d6274a3c00c5dc96221
Author: Samuel Walladge <samuel@swalladge.id.au>
Date:   Thu,  7 Jul 2016 11:13:43 +0930

use fallback values for unsynced notes with 'dump' option

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

diff --git a/simplenote_cli/sncli.py b/simplenote_cli/sncli.py @@ -1045,10 +1045,10 @@ def cli_note_dump(self, key): print(sep) print(('| {:<' + str(w) + '} |').format((' Title: ' + title)[:w])) - print(('| {:<' + str(w) + '} |').format((' Key: ' + note['key'])[:w])) + print(('| {:<' + str(w) + '} |').format((' Key: ' + note.get('key', 'Localkey: {}'.format(note.get('localkey'))))[:w])) print(('| {:<' + str(w) + '} |').format((' Date: ' + mod_time)[:w])) print(('| {:<' + str(w) + '} |').format((' Tags: ' + tags)[:w])) - print(('| {:<' + str(w) + '} |').format((' Version: v' + str(note['version']))[:w])) + print(('| {:<' + str(w) + '} |').format((' Version: v' + str(note.get('version', 0)))[:w])) print(('| {:<' + str(w) + '} |').format((' Flags: [' + flags + ']')[:w])) if utils.note_published(note) and 'publishkey' in note: print(('| {:<' + str(w) + '} |').format(('Published: http://simp.ly/publish/' + note['publishkey'])[:w]))