nncli

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

commit cb9967ab5c6edb5543459db57352beee3d56464d
parent f13c3a7c0207d7dcdd85ebf94b8700c1ff873180
Author: Eric Davis <edavis@insanum.com>
Date:   Sun,  6 Jul 2014 17:18:46 -0700

new keybind command to force a full sync

Diffstat:
Mconfig.py | 6++++--
Msncli.py | 6++++--
2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/config.py b/config.py @@ -24,6 +24,7 @@ def __init__(self): 'kb_help' : 'h', 'kb_quit' : 'q', + 'kb_sync' : 'S', 'kb_down' : 'j', 'kb_up' : 'k', 'kb_page_down' : ' ', @@ -33,7 +34,7 @@ def __init__(self): 'kb_bottom' : 'G', 'kb_top' : 'g', 'kb_status' : 's', - 'kb_delete_note' : 'D', + 'kb_trash_note' : 'T', 'kb_create_note' : 'C', 'kb_edit_note' : 'e', 'kb_view_note' : 'enter', @@ -124,6 +125,7 @@ def __init__(self): { 'help' : [ cp.get(cfg_sec, 'kb_help'), [ 'common' ], 'Help' ], 'quit' : [ cp.get(cfg_sec, 'kb_quit'), [ 'common' ], 'Quit' ], + 'sync' : [ cp.get(cfg_sec, 'kb_sync'), [ 'common' ], 'Full sync' ], 'down' : [ cp.get(cfg_sec, 'kb_down'), [ 'common' ], 'Scroll down one line' ], 'up' : [ cp.get(cfg_sec, 'kb_up'), [ 'common' ], 'Scroll up one line' ], 'page_down' : [ cp.get(cfg_sec, 'kb_page_down'), [ 'common' ], 'Page down' ], @@ -134,7 +136,7 @@ def __init__(self): 'top' : [ cp.get(cfg_sec, 'kb_top'), [ 'common' ], 'Goto top' ], 'status' : [ cp.get(cfg_sec, 'kb_status'), [ 'common' ], 'Toggle status bar' ], 'view_log' : [ cp.get(cfg_sec, 'kb_view_log'), [ 'common' ], 'View log' ], - 'delete_note' : [ cp.get(cfg_sec, 'kb_delete_note'), [ 'titles' ], 'Delete a note' ], + 'trash_note' : [ cp.get(cfg_sec, 'kb_trash_note'), [ 'titles' ], 'Trash a note' ], 'create_note' : [ cp.get(cfg_sec, 'kb_create_note'), [ 'titles' ], 'Create a new note' ], 'edit_note' : [ cp.get(cfg_sec, 'kb_edit_note'), [ 'titles' ], 'Edit note' ], 'view_note' : [ cp.get(cfg_sec, 'kb_view_note'), [ 'titles' ], 'View note' ], diff --git a/sncli.py b/sncli.py @@ -249,6 +249,9 @@ def frame_keypress(self, size, key): elif key == self.config.get_keybind('help'): self.switch_frame_body(self.view_help) + elif key == self.config.get_keybind('sync'): + self.sync_full_threaded() + elif key == self.config.get_keybind('view_log'): self.switch_frame_body(self.view_log) @@ -339,7 +342,7 @@ def frame_keypress(self, size, key): else: self.status_bar = self.config.get_config('status_bar') - elif key == self.config.get_keybind('delete_note'): + elif key == self.config.get_keybind('trash_note'): if self.body_get().__class__ == view_titles.ViewTitles: note = lb.note_list[lb.focus_position].note self.ndb.set_note_deleted(note['key']) @@ -508,7 +511,6 @@ def init_view(self, loop, arg): if self.do_sync: # start full sync after initial view is up - #self.sync_full_threaded() self.sncli_loop.set_alarm_in(1, self.sync_full_initial, None) def ba_bam_what(self):