Hello every body.
I’ve been trying out the sqlite-mode and it is really nice and easy to use, so this post is just an invitation to try it out.
As an example, here is a function that grabs highlighted notes from an ebook reader’s database.
(defun my/sqlite-get-notes ()
"Get notes from the ebook reader database."
(interactive)
(let* ((db (sqlite-open "/media/Nook/Mantano/mreader.db"))
(titles (and db (sqlite-select
db
(format "select title from %s" "note"))))
(title (and titles (completing-read "title: " titles))))
(when db
(mapc (lambda (note)
(insert (format "%d: %s\n" (car note) (cl-second note ))))
(sqlite-select
db
(format "select page_num, highlight_text from %s where title='%s'" "note" title))))))