Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Sony Reader > Sony Reader Dev Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 12-30-2011, 07:15 PM   #16
fei-d
Member
fei-d is on a distinguished road
 
Posts: 14
Karma: 50
Join Date: Jan 2010
Device: Sony PRS 505
I just tried your code, but it did not work...

The cygwin terminal just gave me the "-bash: ./sqlite3.exe: No such file or directory" message again.

So I changed this part of the code, just like opitzs has described earlier, and it worked again.

For example, I currently read Viktor Frankl's "Man's Search for Meaning" and extracted some of the highlightings I took. I attached the "quotes.txt" document to this post, so that one can see this 200 character limit.

This is the code I successfully used:

Code:
	#!/bin/bash
	OUTPUT_FILE='quotes.txt'
	SQLITE='sqlite3'
	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--------------------\n"$3"\n--------------------" }'| \

unix2dos >> $OUTPUT_FILE
Attached Files
File Type: txt quotes.txt (7.9 KB, 595 views)
fei-d is offline   Reply With Quote
Old 01-01-2012, 09:31 AM   #17
opitzs
Avid Reader
opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.
 
opitzs's Avatar
 
Posts: 161
Karma: 36472
Join Date: Sep 2008
Location: Look for rain, hail and snow...
Device: PRS-505, PRS-600, PRS T1, Kobo Glo
That may be a limitation of the PRS-T1. AFAIK there is one limit for DRM protected books and a higher limit for non DRM protected books.
I don't think that this can be changed.
opitzs is offline   Reply With Quote
Advert
Old 01-02-2012, 03:19 AM   #18
snarkophilus
Wannabe Connoisseur
snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.
 
Posts: 426
Karma: 2516674
Join Date: Apr 2011
Location: Geelong, Australia
Device: Kobo Libra 2, Kobo Aura 2, Sony PRS-T1, Sony PRS-350, Palm TX
Quote:
Originally Posted by opitzs View Post
That may be a limitation of the PRS-T1. AFAIK there is one limit for DRM protected books and a higher limit for non DRM protected books.
I don't think that this can be changed.
I just added a quote ("highlight" in the popup - I looked for "quote" and couldn't find it ) of a longish bit of text inside the current periodical I'm reading, and inside the books.db file the quote is truncated at 403 characters. The field that the quote is in is an sqlite3 "text" so there's no size limitation inside the DB. As opitzs says, this does seem like Sony Reader application limitation.

Cheers,
Simon.
snarkophilus is offline   Reply With Quote
Old 01-02-2012, 11:40 AM   #19
pboisso
Junior Member
pboisso began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jan 2012
Device: sony prs-t1
If anyone finds how to overcome this character limit, I'd be very interested to know the solution. I'm thinking to returning the unit because of this.
pboisso is offline   Reply With Quote
Old 01-03-2012, 09:36 AM   #20
damaki
Member
damaki has learned how to buy an e-book online
 
Posts: 11
Karma: 78
Join Date: Jun 2011
Location: Villejuif, France
Device: Kindle 3
I will make a small zip for the Windows people around
It won't be for today, though.

And I don't have enough time on my hands, these dayq, to have a proper look at how Calibre plugins work.

Last edited by damaki; 01-03-2012 at 09:39 AM.
damaki is offline   Reply With Quote
Advert
Old 03-06-2012, 06:29 AM   #21
Le_Tigre
Member
Le_Tigre began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Feb 2012
Device: PRS-T1
think there is one allready:

https://www.mobileread.com/forums/sho...d.php?t=170051

EDIT: sry - 4 windows that is - it does not grab beyond the 200 char limit though...
Le_Tigre is offline   Reply With Quote
Old 03-06-2012, 08:01 AM   #22
Yoths
Enthusiast
Yoths is as sexy as a twisted cruller doughtnut.Yoths is as sexy as a twisted cruller doughtnut.Yoths is as sexy as a twisted cruller doughtnut.Yoths is as sexy as a twisted cruller doughtnut.Yoths is as sexy as a twisted cruller doughtnut.Yoths is as sexy as a twisted cruller doughtnut.Yoths is as sexy as a twisted cruller doughtnut.Yoths is as sexy as a twisted cruller doughtnut.Yoths is as sexy as a twisted cruller doughtnut.Yoths is as sexy as a twisted cruller doughtnut.Yoths is as sexy as a twisted cruller doughtnut.
 
Posts: 30
Karma: 15142
Join Date: Sep 2010
Device: SONY PRS-T1
Does anyone know how to decrypt the SONY's/ADE's text position declarations (e.g. point(/1/4/2/6/1/1:101))?

Theoretically, the numbers after slashes are "children in the DOM tree starting from the document node and counting both element and text nodes". But in practice they count in a very strange way... Or they use not the original document but the internal parsed tree...

Example:

Source document:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Preface</title>
<link href="css/main.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div>
<h3>PREFACE.</h3>
<hr class="spacing" />
<p><em>The chief beauty of this book lies not, so much in its literary
style, or in the extent and usefulness of the information it conveys,
as in its simple truthfulness. Its pages form the record of events that
really happened. All that has been done is to colour them; and, for
this, no extra charge has been made. George and Harris and Montmorency
are not Poetic ideals, but things of flesh and blood &mdash; especially
George, who weighs about twelve stone. Other works may excel this in
depth of thought and knowledge of human nature: other books may rival
it in originality and size; but, for hopeless and incurable veracity,
nothing yet discovered can surpass it. This, more than all its other
charms, will, it is felt, make the volume precious in the eye of the
earnest reader; and will lend additional weight to the lesson that the
story teaches.</em></p>
<p>LONDON, August, 1889
</p>
</div>
</body></html>
Marked text:
Code:
The chief beauty of this book lies not, so much in its literary
style, or in the extent and usefulnes
SONY/ADE text position declaration:
Code:
start="OEBPS/boat003_preface.xhtml#point(/1/4/2/6/1/1)" end="OEBPS/boat003_preface.xhtml#point(/1/4/2/6/1/1:101)
Yoths is offline   Reply With Quote
Old 03-07-2012, 03:20 AM   #23
Le_Tigre
Member
Le_Tigre began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Feb 2012
Device: PRS-T1
@Yoths
- i'm not very tech savy - so sry if i got you wrong.
it just looks like you are aiming @ a tool to maybe complete the annotations to export them - and in that case i just would like to help.

well i think the code for the ade annot. / reference system is:

Identifying positions in the document

A string which identifies a position in the EPUB (sometimes called bookmark) has the following structure:

full-path-to-resource#point(/N/N/N:N)

where N after slash is a child in the DOM tree starting from the document node and counting both element and text nodes. N after semicolon (optional) is byte offset in utf8-encoded text node.

(found here:http://code.google.com/p/epub-revisi...pleAnnotations)

the last N: is the reference to the words/word numbers - cascading from there the different groups within the text i assume...

found here:
http://www.w3.org/TR/DOM-Level-2-Core/introduction.html
Le_Tigre is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Change single quotes to double quotes Elfwreck Workshop 16 04-26-2013 10:06 AM
Auto extract atjnjk Calibre 2 10-23-2010 11:52 AM
Single quotes to double quotes? lunixer General Discussions 35 10-10-2010 05:47 AM
convert straight quotes to curly quotes alansplace Calibre 3 09-25-2010 03:51 PM
Extract html from epub Waltarro ePub 3 08-27-2009 05:21 AM


All times are GMT -4. The time now is 04:46 PM.


MobileRead.com is a privately owned, operated and funded community.