View Single Post
Old 10-15-2012, 09:46 AM   #3
dicks
Junior Member
dicks began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jul 2012
Device: Kobo Touch
Quote:
Originally Posted by gioele View Post
[*] Is it possible to export the annotations to a PC? (With a tool that works on Linux, possibly.)
You can extract the annotations from the sqlite database of the Kobo.
This shell script works for the Kobo Touch, I think it will also work
for the Glo. You should adapt the kobodir definition to the mount point
of the device (or directory containing a copy of the device contents).
Code:
#!/bin/sh
# ----------------------------------------------------------------------
# Extract the bookmark annotations from the Kobo database.
# ----------------------------------------------------------------------

kobodir=/media/KOBOeReader
db="$kobodir/.kobo/KoboReader.sqlite"

sqlite3 "$db" 'select VolumeID,StartContainerPath,Text,Annotation from Bookmark;' |
awk -F'|' 'BEGIN{OFS="|"}{gsub("/", "_", $1); print}' |
sort -t/ -k1 -k2 -n -k4 -k5 -k6 -k7 -k8 |
sed	'
	s/[^|]*|//
	s/[^|]*|//
	s/|/\n\n/
	s/$/\n\n/
	'

Last edited by dicks; 10-15-2012 at 10:14 AM. Reason: changed kobodir definition
dicks is offline   Reply With Quote