Skip to content

Commit eceea64

Browse files
committed
fix: format reminder-time on export
fix #86
1 parent ec65853 commit eceea64

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

evernote_backup/note_formatter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ def format_note(self, note: Note) -> str:
4242
"source-url": note.attributes.sourceURL,
4343
"source-application": note.attributes.sourceApplication,
4444
"reminder-order": note.attributes.reminderOrder,
45-
"reminder-time": note.attributes.reminderTime,
46-
"reminder-done-time": note.attributes.reminderDoneTime,
45+
"reminder-time": fmt_time(note.attributes.reminderTime),
46+
"reminder-done-time": fmt_time(note.attributes.reminderDoneTime),
4747
"place-name": note.attributes.placeName,
4848
"content-class": note.attributes.contentClass,
4949
}

tests/test_note_formatter.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@
4848
source="desktop.win",
4949
sourceURL="https://www.example.com/page?category=blog&post_id=123",
5050
sourceApplication="evernote.win32",
51+
reminderOrder=100,
52+
reminderTime=1744008231000,
53+
reminderDoneTime=1744018231000,
5154
),
5255
tagNames=["test1", "test2"],
5356
)
@@ -64,6 +67,9 @@
6467
<source>desktop.win</source>
6568
<source-url>https://www.example.com/page?category=blog&amp;post_id=123</source-url>
6669
<source-application>evernote.win32</source-application>
70+
<reminder-order>100</reminder-order>
71+
<reminder-time>20250407T064351Z</reminder-time>
72+
<reminder-done-time>20250407T093031Z</reminder-done-time>
6773
</note-attributes>
6874
<content>
6975
<![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?>

0 commit comments

Comments
 (0)