Exemple #1
0
 def _update_file(self, file_note, note):
     """
     Updates file from note
     """
     GeekNote().loadNoteContent(note)
     content = editor.ENMLtoText(note.content)
     open(file_note['path'], "w").write(content)
Exemple #2
0
 def _create_file(self, note):
     """
     Creates file from note
     """
     GeekNote().loadNoteContent(note)
     content = editor.ENMLtoText(note.content)
     path = os.path.join(self.path, note.title + self.extension)
     open(path, "w").write(content)
     return True
Exemple #3
0
def showNote(note):
    separator("#", "TITLE")
    printLine(note.title)
    separator("=", "META")
    printLine("Created: " + printDate(note.created).ljust(15, " ") +
              "Updated: " + printDate(note.updated).ljust(15, " "))
    separator("-", "CONTENT")
    if note.tagNames:
        printLine("Tags: %s" % ', '.join(note.tagNames))

    printLine(editor.ENMLtoText(note.content))