View Single Post
Old 12-30-2011, 07:48 AM   #15
j0534ng31
Connoisseur
j0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheesej0534ng31 can extract oil from cheese
 
Posts: 83
Karma: 1224
Join Date: Dec 2011
Location: Gijon (Spain)
Device: Sony PRS-T1 black
Lightbulb

Quote:
Originally Posted by fei-d View Post
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
j0534ng31 is offline   Reply With Quote