def delete(self, user): print(f"\n Okey {user[1]}!! Let's delete notes") title= input("\nIntroduce the title of the note you want to delete: ") note = model.Note(user[0], title) delete = note.todelete() if delete[0] >=1: print (f"\nWe have delete the note: {note.title}") else: print (f"\nIt wasn't possible to delete the note. Try later")
def show(self, user): print(f"\nOk. {user[1]}!! Here you have your notes: ") note = model.Note(user[0]) notes = note.tolist() for note in notes: print("\n**********************") print(f"Title: {note[2]}") print(f"Description: {note[3]}") print("\n**********************")
def delete(self, user): print("\nVamos a borrar notas") title = input("\nIntroduce el título de la nota a borrar: ") note = model.Note(user[0], title) delete = note.delete() if delete[0] >= 1: print(f"Se ha borrado la nota: {note.title}") else: print("No se ha podido borrar la nota")
def show(self, user): print("\nEstas son tus notas: ") note = model.Note(user[0]) notes = note.show() for note in notes: print("\n****************************************************") print(note[2]) print(note[3]) print("\n****************************************************")
def create(self, user): title = input("Introduce the title:") body = input("introduce the content:") note = model.Note(user[0], title, body) save = note.save() if save[0] >= 1: print(f"Perfect {user[1]}, note created and saved succesfully!!") else: print("Something went wrong, note couldn't be save")
def show(self, user): print(f"These are your notes {user[1]}:\n") note = model.Note(user[0]) ls_notes = note.ls() for note in ls_notes: print("********************************") print(f"TITLE:{note[2]}\n") print(f"{note[3]}\n") input()
def create(self, user): print(f"Ok. {user[1]} !! Let's go to create new note") title = input("Introduce the note title: ") description = input("Introduce the content of your note:") note = model.Note (user[0], title, description) tosave = note.tosave() if tosave[0] >= 1: print(f"\nPerfect. You have saved the note: {note.title}") else: print(f"\nSorry. I couldn't be possible to create the note")
def create(self, user): print("Vamos a crear una nueva nota") title = input("Ingresa el título de tu nota: ") desc = input("Ingresa el contenido de tu nota: ") note = model.Note(user[0], title, desc) save = note.save() if save[0] >= 1: print(f"\nPerfecto, has guardado la nota {note.title}") else: print(f"\nNo se ha podido guardar la nota")
def delete(self, user): print(f"\nOK let's delete, what is the title of the note? ") title = input() if title == "": print("Couldn't delete the note") return note = model.Note(user[0], title) erased = note.d() if erased[0] >= 1: print(f'Note {title} has been deleted!!') else: print("Couldn't delete the note")