Liberating and Importing Microsoft/Windows Sticky Notes

Just puzzled through this over the past few days and finally figured it out. Going to share the barebones instructions here and if there is any interest, I can go into more details later.

(Win 10)

  • Find sqlite database
  • Copy plum.db to temp folder
  • Install SQLiteStudio
  • Load plum.db
  • Enter script in function editor
if {[catch {
lassign $argv fileName contents
set fd [open "C:/tmp/a/$fileName" a+]
puts $fd $contents
close $fd
} res]} {
return "error: $res"
} else {
return "ok"
  • Create dir c:\tmp\a
  • Run query:
select saveToFile(timestamp || '.md',text) as res from
(select createdat, strftime('%Y-%m-%d %H.%M.%S',((CreatedAt-504911232000000000)/10000000)-11644473600,'unixepoch') as timestamp, group_concat(value,char(10)) as text
from Note, json_tree("Note".lastServerVersion, '$.document') as tree
where key='text'
group by createdat)
  • Copy output files to vault

Hat tip Googie for their answer to this 7 year old stackoverflow question.


Happy with how this turned out. Learned a lot along the way:

  • Brushed up on SQL
  • How to parse JSON inside a SQL table
  • How to convert LDAP time to unix time
    • (found a bug in the ms time implementation too)
  • Tracked down a tcl script for sqlite to spit out files

Iā€™m cross-posting this to Meta - Migration Workflows thanks!

1 Like