12-11-2012, 04:23 PM | #16 | |
Treachery of images ...
Posts: 4,069
Karma: 91561091
Join Date: May 2012
Location: Australia
Device: Blackberry Playbook, Sony 650, Kobo Glo, H2O, Aura One, Forma, Libra 2
|
Quote:
Calibre's great, eh!! Last edited by Lynx-lynx; 12-11-2012 at 04:32 PM. |
|
12-11-2012, 04:30 PM | #17 |
Treachery of images ...
Posts: 4,069
Karma: 91561091
Join Date: May 2012
Location: Australia
Device: Blackberry Playbook, Sony 650, Kobo Glo, H2O, Aura One, Forma, Libra 2
|
Hang about, I've just found the Annotations, and highlighting, in the section on the far right of the Calibre main library screen that shows the book you've highlighted, and the title, format and metadata info.
But I haven't found it at the back of the Calibre version of the book. Golly, if I end up with say 100 annotations or notes, and even more highlights - not an unnusual proposition in non-fiction research, then surely they don't all sit there!!! Yikes ... I suppose this really is a question for the Calibre forum, eh |
12-12-2012, 06:25 AM | #18 | |
Member
Posts: 20
Karma: 8644
Join Date: Dec 2012
Device: kobo glo
|
Quote:
You take ur notes and higlights on ur device. Then you use a command (fetch annotations) within calibre that's supposed to collect ur annotations someplace so that you can copy them and export them? Is that correct? |
|
12-12-2012, 07:26 AM | #19 | |
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
|
|
12-12-2012, 12:48 PM | #20 | |
Member
Posts: 20
Karma: 8644
Join Date: Dec 2012
Device: kobo glo
|
Quote:
Because if I can take the annotations from calibre, and they are not the mess I've seen in that link I posted before, I would have solved my problems. |
|
12-12-2012, 06:34 PM | #21 | |
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
|
|
12-13-2012, 04:00 AM | #22 | |
Member
Posts: 20
Karma: 8644
Join Date: Dec 2012
Device: kobo glo
|
Quote:
edit: I've found the command (it says experimental). In a nutshell when I send a book to my device I use the option "fetch annotations". Then when I finish the reading and have taken my annotations, I connect my device to calibre again, and I should find all of them in the metadata field, am I right? edit2: failed experiment. All the annotations it took were the positions of the bookmarks and the percentage of the book I had read. I hope with the kobo will work better. Last edited by Shardancalibre; 12-13-2012 at 04:18 PM. |
|
09-01-2013, 04:13 AM | #23 | |
Addict
Posts: 392
Karma: 3421956
Join Date: Sep 2009
Device: Kobo Forma, Sage, Elipsa, Onyx Note2, Pocketbook 360, Kindle Keyboard
|
Quote:
Incidentally, on the reader itself (Aura), the annotations and bookmarks are often displayed in a weird order. E.g. a bookmark placed on page 30 will sometimes sit before or between highlights from page 20 in the list the Aura displays to me. Really rather annoying. Is there an easy way to read and edit the xml files, or extract just the annotations from it? I'm not used to editing xml and all the xml codes are kind of distracting. I'd like an easy way just to get the highlighted texts and annotations in a simpler word processor. |
|
09-01-2013, 04:18 AM | #24 | |||
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
Quote:
Quote:
Last edited by davidfor; 09-01-2013 at 06:05 AM. Reason: Fixed quoting |
|||
09-01-2013, 05:24 AM | #25 | |
Addict
Posts: 392
Karma: 3421956
Join Date: Sep 2009
Device: Kobo Forma, Sage, Elipsa, Onyx Note2, Pocketbook 360, Kindle Keyboard
|
Quote:
Not without writing some code.[/QUOTE] That's what I suspected. A pity no one has written a simple editor or extraction programme yet that convert the annot-files into something more easily usable for the average reader. It's beyond my abilities. I've just had a look at the xml in Editpad. I thought basically deleting all text between </text> and <text> would serve my purposes -- but my knowledge of regular expressions is so limited I can't even manage that (i.e. remove each string of </text><anything in between><text>). By the way, I'm pretty sure the fetch annotation command left me with only part of the highlights for one book in the comments field. I compared it with the annot file, and the highlights missing in Calibre really were there in the file. |
|
09-01-2013, 06:28 AM | #26 | |
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
There are some other ways to get the annotations off the device. My utilities plugin will get the annotations for selected books as text. But, it uses the same code as the fetch annotations. Someone, tshering I think, has written a little utility to fetch them. And I'm pretty sure someone has posted a script to do it as well. |
|
11-22-2013, 04:35 PM | #27 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
For the Kindle, I would just use the Annotations plugin, it works very well. Someone should add compatibility with the Kobo .xml's.
|
11-22-2013, 05:09 PM | #28 | |
Wizard
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
|
Quote:
|
|
11-22-2013, 07:02 PM | #29 |
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
I had a look a while ago and did about half of it. But, the plugin doesn't use the ondevice hints in the library. It does its own matching and it was 100% when I tested it. I haven't looked at it recently, so it might have changed.
|
11-25-2013, 01:44 PM | #30 |
Member
Posts: 23
Karma: 25468
Join Date: Jul 2013
Location: Germany
Device: Kobo mini
|
How to list on the Kobo itself ALL annotations from ALL books
This script extracts all texts (highlighted texts, annotation texts, notes added to bookmarks) from the annotation xml files in folder /mnt/onboard/Digital Editions/Annotations. It is meant to run on the Kobo itself. The resulting file /mnt/onboard/pakoe/_annot.html is sorted and formatted. By adding on your Kobo a certain string to an annotation you can hide texts older than that annotation (useful if you are working through your annotations chronologically). _annot.html must already exist before (just create an empty file). The script could be started using Kobo Tweaks, I start it by simply opening _annot.html (open it again to refresh) having used fmon from KoboLauncher to make _annot.html an "alias" for the script file _annot.sh by the following line in /mnt/onboard/.kobo/on_start.sh
Code:
/mnt/onboard/pakoe/fmon /mnt/onboard/pakoe/_annot.html /mnt/onboard/pakoe/_annot.sh 2>&1 & Of course _annot.html can't be used to edit or delete annotations or to open a book and jump to an annotation. _annot.html just shows ALL annotations (or all newer than one you selected) from ALL books well formatted and sorted. And you can view and refresh it on the Kobo without connecting to a computer. If you have sqlite3 on your Kobo (it is included for example in "Kobo Start Menu", see https://www.mobileread.com/forums/sho...d.php?t=233259), a much simpler solution is possible, reading the annotations from the file .kobo/KoboReader.sqlite on the Kobo. So here is _annot.sh (probably it still could be simplified): Code:
filePath=/mnt/onboard/pakoe/ fileName=$filePath"_annot.html" tmpFile=$filePath"tempAnnot" annotLog=$filePath"_annot.log" hideIfOlderThanThis="kkqqq" count=1 date > $annotLog mySed() { echo "$1" >> $annotLog sed -r "$1" $fileName >> $tmpFile 2>> $annotLog #fileName=$filePath"tmp"$count # Auf die Datei $fileName werden bis zum nächsten mySed evtl. noch weitere Befehle angewandt, erst dann wird fileName neu definiert. Die Datei $fileName hat also nicht den Zustand unmittelbar NACH einem mySed, sondern den unmittelbar VOR einem mySed (bzw. am Ende des Scripts)! count=`expr $count + 1` mv $tmpFile $fileName } mySort() # setzt voraus, dass alle \n durch # ersetzt sind, ersetzt aber das letzte # vor jeder Annotation wieder durch \n (dadurch enthält jede Zeile genau 1 Annotation) (die erste Zeile theoretisch vielleicht gar keine) { mySed 's!#([^#]*<annotation>)!\n\1!g' # Copy something to the beginning of each line to determine sorting order, mark its ending by =: mySed $1 sort -f $fileName -o $fileName # Remove again what was copied to determine sorting order: mySed 's!^[^=]+=!!g' } mv $fileName $filePath"_annot.bak.html" # "^ *[^ <]" looks for continuation lines of multi-line texts. Because of the number of spaces before <dc:date> not the <dc:date> tag inside the <content> tag of an <annotation> tag is found (change date), but the <dc:date> tag inside the <annotation> tag itself (creation date). So if you are working through your annotations chronologically, you can hide older annotations by adding the value of hideIfOlderThanThis to a (new or existing) annotation: grep -E '<annotation>|<text>|<content>|^ *[^ <]|^ <dc:date>' -r "/mnt/onboard/Digital Editions/Annotations" > $fileName 2>> $annotLog # _<<1, _<<2 can safely be used as markers, as any < IN A TEXT has been replaced by < in the .annot file (which of course contains many <, but no <<): mySed 's!#!_<<1!g' mySed 's!=!_<<2!g' tr '\n' '#' < $fileName >> $tmpFile 2>> $annotLog mv $tmpFile $fileName mySort 's!^.*<dc:date>20(..-..-.....:..:..)!\1=\0!g' # Remove annotations without text (bookmarks): mySed 's!^!=!g' mySed 's!^=(.*<text>)!\1!g' mySed 's!^=.*$!!g' # Falls etwas gefunden wird, entsteht eine Leerzeile, d.h. die Zeile wird nicht gelöscht tr '\n' '#' < $fileName >> $tmpFile 2>> $annotLog mv $tmpFile $fileName # alles vom Anfang greedy bis zum Anfang der letzten Zeile, die $hideIfOlderThanThis enthält, löschen: mySed 's!.*#(.*?<annotation>.*?'$hideIfOlderThanThis')!\1!g' mySort 's!^([^:]*)/([^:/]+):.*<dc:date>20(..-..-.....:..:..)!\2#\1#\3=\0!g' mySed 's!#!\n!g' mySed 's!^[^:]*/([^:/]+\.annot:)!=\1j=\1!g' tr '\n' '#' < $fileName >> $tmpFile 2>> $annotLog mv $tmpFile $fileName # Now # is a line break, = and j= mark the beginning of an annotation file name. # Leerzeilen wurden beim Sortieren nur durch # dargestellt und daher NICHT aus dem Weg geräumt und müssen hier berücksichtigt werden: mySed 's!j(=[^:]+\.annot:)([^#]*#+)\1!\2!g' mySed 's!#!\n!g' mySed 's!j=[^:]+\.annot:!!g' mySed 's!=([^:]+)\.annot:!<br /><b><i><u>\1</u></i></b>!g' mySed 's!<text>!!g' mySed 's#</text>##g' mySed 's!<content>!<b>#</b>!g' mySed 's#<annotation>#<br />#g' mySed 's!'$hideIfOlderThanThis'!<b><i>\0</i></b>!g' mySed 's#<dc:date>.*(..)[^0-9]0?([1-9][0-9]?)[^0-9]0?([1-9][0-9]?)[^0-9]+(..:..):.+</dc:date>#<b>\3.\2</b>.\1,\4#g' mySed 's!_<<1!#!g' mySed 's!_<<2!=!g' echo '<html><head>' > $tmpFile echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />' >> $tmpFile echo '</head><body>' >> $tmpFile date +"%-d.%-m.%y %-H:%M" >> $tmpFile echo ' ("<b><i>'$hideIfOlderThanThis'</i></b>" in einer Annotation blendet alle älteren aus!)' >> $tmpFile cat $fileName >> $tmpFile echo '<br />-------------------END-------------------' >> $tmpFile echo '</body></html>' >> $tmpFile mv $tmpFile $fileName Last edited by pakoe; 04-05-2014 at 08:28 AM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre support for Kobo Annotations | timlegge | Kobo Reader | 29 | 09-09-2016 06:48 AM |
Touch support for annotations and bookmarks on epub? | jfca283 | Kobo Reader | 8 | 11-03-2011 07:47 PM |
Pdf annotations and Kindle annotations | BranMakMorn | Calibre | 0 | 06-25-2011 02:42 PM |
Support officially outsourced to Phillippines (paid support) | larka | enTourage eDGe | 5 | 06-08-2011 12:48 AM |
Is Astak support on vacation or just stopped support? | dmikov | Astak EZReader | 9 | 01-22-2010 01:43 PM |