Created
January 22, 2013 20:04
-
-
Save dropmeaword/4597932 to your computer and use it in GitHub Desktop.
Export annotations from Kobo Touch ereader (assumes /media/KOBOeReader as the mountpoint)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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/ ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment