Skip to content

Commit

Permalink
add LAST_MODIFIED attribute when exporting
Browse files Browse the repository at this point in the history
  • Loading branch information
ixzhao authored Sep 27, 2024
1 parent ebed0c0 commit 6a942d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bookmarks/services/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ def append_bookmark(doc: BookmarkDocument, bookmark: Bookmark):
toread = "1" if bookmark.unread else "0"
private = "0" if bookmark.shared else "1"
added = int(bookmark.date_added.timestamp())
modified = int(bookmark.date_modified.timestamp())

doc.append(
f'<DT><A HREF="{url}" ADD_DATE="{added}" PRIVATE="{private}" TOREAD="{toread}" TAGS="{tags}">{title}</A>'
f'<DT><A HREF="{url}" ADD_DATE="{added}" LAST_MODIFIED="{modified}" PRIVATE="{private}" TOREAD="{toread}" TAGS="{tags}">{title}</A>'
)

if desc:
Expand Down

0 comments on commit 6a942d4

Please sign in to comment.