Quote:
Originally Posted by fei-d
But now there seems to be a limit at how much is extracted, because it only extracted up to 200 characters; longer highlighted sections were not completely extracted....
|
Can you test if this works as you want? (I can't because I have not received my T1 yet...)
Code:
#!/bin/bash
OUTPUT_FILE='quotes.txt'
SQLITE='./sqlite3.exe'
AWK='awk'
#add the UTF-8 BOM to the generated file
echo -ne '\xEF\xBB\xBF' > $OUTPUT_FILE
$SQLITE Sony_Reader/database/books.db 'select b.author, b.title, a.marked_text FROM annotation a INNER JOIN books b on a.content_id=b._id' | \
$AWK -F '|' '{ print "--------------------\nAuthor: "$1"\nTitle: "$2"\n--------------------"; $1=""; $2=""; print $0"\n--------------------" }'| \
unix2dos >> $OUTPUT_FILE