def show_note_snippet(note, key=0):
    notebook = note.notebookName if hasattr(note, 'notebookName') else ''
    suggested = (' >> ' + note.suggestedNotebook) if hasattr(note, 'suggestedNotebook') else ''
    out.printLine("%s : %s%s%s" % (
        str(key).rjust(2, " "),
        #print date
        out.printDate(note.updated).ljust(12, " ") if hasattr(note, 'updated') else '',
        #print notebook
        (notebook + suggested + ' ').ljust(20, " ") if (notebook or suggested) else '',
        #print title
        note.title if hasattr(note, 'title') else note.name,
    ))
Beispiel #2
0
 def test_print_date(self):
     self.assertEquals(printDate(1095292800000), '2004-09-17')
Beispiel #3
0
 def test_print_date(self):
     self.assertEquals(printDate(1000000), '01.01.1970')
Beispiel #4
0
 def test_print_date(self):
     self.assertEquals(printDate(1000000), '12.01.1970')
Beispiel #5
0
 def test_print_date(self):
     self.assertEquals(printDate(1095292800000), '2004-09-17')