def remove(self, notebook, force=None): notebook = self._searchNotebook(notebook) if not force and not out.confirm('Are you sure you want to delete this notebook: "%s"?' % notebook.name): return tools.exit() out.preloader.setMessage("Deleting notebook...") result = self.getEvernote().removeNotebook(guid=notebook.guid) if result: out.successMessage("Notebook has been successfully removed.") else: out.failureMessage("Error while removing the notebook.")
def remove(self, tagname, force=None): tag = self._searchTag(tagname) if not force and not out.confirm('Are you sure you want to delete this tag: "%s"?' % tag.name): return tools.exit() out.preloader.setMessage("Deleting tag...") result = self.getEvernote().removeTag(guid=tag.guid) if result: out.successMessage("Tag has been successfully removed.") else: out.failureMessage("Error while removing the tag.")
def logout(self, force=None): if not self.getEvernote().checkAuth(): out.failureMessage("You have already logged out.") return tools.exitErr() if not force and not out.confirm('Are you sure you want to logout?'): return tools.exit() result = self.getEvernote().removeUser() if result: out.successMessage("You have successfully logged out.") else: out.failureMessage("Logout error.") return tools.exitErr()
def remove(self, note, force=None): self.connectToEvertone() note = self._searchNote(note) if not force and not out.confirm('Are you sure you want to delete this note: "%s"?' % note.title): return tools.exit() out.preloader.setMessage("Deleting note...") result = self.getEvernote().removeNote(note.guid) if result: out.successMessage("Note has been successful deleted.") else: out.failureMessage("Error while deleting the note.")
def remove(self, note, force=None): self.connectToEvertone() note = self._searchNote(note) if not force and not out.confirm( 'Are you sure you want to ' 'delete this note: "%s"?' % note.title): return tools.exit() out.preloader.setMessage("Deleting note...") result = self.getEvernote().removeNote(note.guid) if result: out.successMessage("Note has been successful deleted.") else: out.failureMessage("Error while deleting the note.")
def remove(self, note, force=None): self.connectToEvernote() note = self._searchNote(note) if note: out.preloader.setMessage("Loading note...") self.getEvernote().loadNoteContent(note) out.showNote(note, self.getEvernote().getUserInfo().id, self.getEvernote().getUserInfo().shardId) if not force and not out.confirm("Are you sure you want to " 'delete this note: "%s"?' % note.title): return tools.exit() out.preloader.setMessage("Deleting note...") result = self.getEvernote().removeNote(note.guid) if result: out.successMessage("Note successfully deleted.") else: out.failureMessage("Error: could not delete note.") return tools.exitErr()
def remove(self, note, force=None): self.connectToEvernote() note = self._searchNote(note) if note: out.preloader.setMessage("Loading note...") self.getEvernote().loadNoteContent(note) out.showNote(note, self.getEvernote().getUserInfo().id, self.getEvernote().getUserInfo().shardId) if not force and not out.confirm('Are you sure you want to ' 'delete this note: "%s"?' % note.title): return tools.exit() out.preloader.setMessage("Deleting note...") result = self.getEvernote().removeNote(note.guid) if result: out.successMessage("Note successfully deleted.") else: out.failureMessage("Error: could not delete note.") return tools.exitErr()