Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 12-11-2012, 04:23 PM   #16
Lynx-lynx
Cheeky Kiki!!
Lynx-lynx ought to be getting tired of karma fortunes by now.Lynx-lynx ought to be getting tired of karma fortunes by now.Lynx-lynx ought to be getting tired of karma fortunes by now.Lynx-lynx ought to be getting tired of karma fortunes by now.Lynx-lynx ought to be getting tired of karma fortunes by now.Lynx-lynx ought to be getting tired of karma fortunes by now.Lynx-lynx ought to be getting tired of karma fortunes by now.Lynx-lynx ought to be getting tired of karma fortunes by now.Lynx-lynx ought to be getting tired of karma fortunes by now.Lynx-lynx ought to be getting tired of karma fortunes by now.Lynx-lynx ought to be getting tired of karma fortunes by now.
 
Lynx-lynx's Avatar
 
Posts: 2,338
Karma: 23733538
Join Date: May 2012
Location: Australia
Device: Blackberry Playbook, Sony 650, Kobo Glo
Quote:
Originally Posted by peitsao View Post
You can copy and paste the notes in calibre's comment field to a document, and I noticed that Kobo's android app will let you send your highlights, etc. to other programs for saving.
I copy and paste annotations that I've made in the Calibre version of books to Citavi (free version), which I use as my research database.

Calibre's great, eh!!

Last edited by Lynx-lynx; 12-11-2012 at 04:32 PM.
Lynx-lynx is offline   Reply With Quote
Old 12-11-2012, 04:30 PM   #17
Lynx-lynx
Cheeky Kiki!!
Lynx-lynx ought to be getting tired of karma fortunes by now.Lynx-lynx ought to be getting tired of karma fortunes by now.Lynx-lynx ought to be getting tired of karma fortunes by now.Lynx-lynx ought to be getting tired of karma fortunes by now.Lynx-lynx ought to be getting tired of karma fortunes by now.Lynx-lynx ought to be getting tired of karma fortunes by now.Lynx-lynx ought to be getting tired of karma fortunes by now.Lynx-lynx ought to be getting tired of karma fortunes by now.Lynx-lynx ought to be getting tired of karma fortunes by now.Lynx-lynx ought to be getting tired of karma fortunes by now.Lynx-lynx ought to be getting tired of karma fortunes by now.
 
Lynx-lynx's Avatar
 
Posts: 2,338
Karma: 23733538
Join Date: May 2012
Location: Australia
Device: Blackberry Playbook, Sony 650, Kobo Glo
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
Lynx-lynx is offline   Reply With Quote
Old 12-12-2012, 06:25 AM   #18
Shardancalibre
Member
Shardancalibre shines like a glazed doughnut.Shardancalibre shines like a glazed doughnut.Shardancalibre shines like a glazed doughnut.Shardancalibre shines like a glazed doughnut.Shardancalibre shines like a glazed doughnut.Shardancalibre shines like a glazed doughnut.Shardancalibre shines like a glazed doughnut.Shardancalibre shines like a glazed doughnut.Shardancalibre shines like a glazed doughnut.Shardancalibre shines like a glazed doughnut.Shardancalibre shines like a glazed doughnut.
 
Posts: 20
Karma: 8644
Join Date: Dec 2012
Device: kobo glo
Quote:
Originally Posted by Lynx-lynx View Post
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
I don't have the kobo here before my eyes (I'll have it in a week or so I suppose) so I practically can't imagine the process. Tell me if I'm right:

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?
Shardancalibre is offline   Reply With Quote
Old 12-12-2012, 07:26 AM   #19
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 5,684
Karma: 5656630
Join Date: Jul 2011
Location: Australia
Device: Kobo Touch, Kobo Glo
Quote:
Originally Posted by Shardancalibre View Post
I don't have the kobo here before my eyes (I'll have it in a week or so I suppose) so I practically can't imagine the process. Tell me if I'm right:

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?
Basically yes. Calibre copies the annotations into the comments field in its metadata for the book. If you want to put them somewhere else, you have to cut-and-paste from there.
davidfor is offline   Reply With Quote
Old 12-12-2012, 12:48 PM   #20
Shardancalibre
Member
Shardancalibre shines like a glazed doughnut.Shardancalibre shines like a glazed doughnut.Shardancalibre shines like a glazed doughnut.Shardancalibre shines like a glazed doughnut.Shardancalibre shines like a glazed doughnut.Shardancalibre shines like a glazed doughnut.Shardancalibre shines like a glazed doughnut.Shardancalibre shines like a glazed doughnut.Shardancalibre shines like a glazed doughnut.Shardancalibre shines like a glazed doughnut.Shardancalibre shines like a glazed doughnut.
 
Posts: 20
Karma: 8644
Join Date: Dec 2012
Device: kobo glo
Quote:
Originally Posted by davidfor View Post
Basically yes. Calibre copies the annotations into the comments field in its metadata for the book. If you want to put them somewhere else, you have to cut-and-paste from there.
Do you happen to know if it can do the same with a kindle device? Just to see practically how this method works (At least my old kindle could prove itself useful after it got its screen broken).
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.
Shardancalibre is offline   Reply With Quote
Old 12-12-2012, 06:34 PM   #21
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 5,684
Karma: 5656630
Join Date: Jul 2011
Location: Australia
Device: Kobo Touch, Kobo Glo
Quote:
Originally Posted by Shardancalibre View Post
Do you happen to know if it can do the same with a kindle device? Just to see practically how this method works (At least my old kindle could prove itself useful after it got its screen broken).
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.
I have never used a Kindle with calibre, so I don't know. For the Kobo, the menu option is on the send to device menu. If the Kindle supports this, it will be there.
davidfor is offline   Reply With Quote
Old 12-13-2012, 04:00 AM   #22
Shardancalibre
Member
Shardancalibre shines like a glazed doughnut.Shardancalibre shines like a glazed doughnut.Shardancalibre shines like a glazed doughnut.Shardancalibre shines like a glazed doughnut.Shardancalibre shines like a glazed doughnut.Shardancalibre shines like a glazed doughnut.Shardancalibre shines like a glazed doughnut.Shardancalibre shines like a glazed doughnut.Shardancalibre shines like a glazed doughnut.Shardancalibre shines like a glazed doughnut.Shardancalibre shines like a glazed doughnut.
 
Posts: 20
Karma: 8644
Join Date: Dec 2012
Device: kobo glo
Quote:
Originally Posted by davidfor View Post
I have never used a Kindle with calibre, so I don't know. For the Kobo, the menu option is on the send to device menu. If the Kindle supports this, it will be there.
Ok thanks. I tried with the kindle but I didn't see anything that could remind that command. I'm sure I'll be needing your help when I get the Kobo. Bye for now.

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.
Shardancalibre is offline   Reply With Quote
Old 09-01-2013, 04:13 AM   #23
franklekens
Addict
franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.
 
franklekens's Avatar
 
Posts: 200
Karma: 632460
Join Date: Sep 2009
Device: Kindle3, KoboAura&Glo, PB 360 & 902 (Kindle Touch, PRS-600, Opus)
Quote:
Originally Posted by davidfor View Post
Basically yes. Calibre copies the annotations into the comments field in its metadata for the book. If you want to put them somewhere else, you have to cut-and-paste from there.
I think the experimental "fetch annotations" function isn't functioning entirely correctly yet. Just tried it, and for one book it only put *part* of the annotations in the comment field.


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.
franklekens is offline   Reply With Quote
Old 09-01-2013, 04:18 AM   #24
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 5,684
Karma: 5656630
Join Date: Jul 2011
Location: Australia
Device: Kobo Touch, Kobo Glo
Quote:
Originally Posted by franklekens View Post
I think the experimental "fetch annotations" function isn't functioning entirely correctly yet. Just tried it, and for one book it only put *part* of the annotations in the comment field.
I haven't used fetch annotations recently, but I can't say I have ever seen any problems with it.
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.
There are some bugs with the annotation management. This is one of them.
Quote:
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.
Not without writing some code.

Last edited by davidfor; 09-01-2013 at 06:05 AM. Reason: Fixed quoting
davidfor is offline   Reply With Quote
Old 09-01-2013, 05:24 AM   #25
franklekens
Addict
franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.franklekens ought to be getting tired of karma fortunes by now.
 
franklekens's Avatar
 
Posts: 200
Karma: 632460
Join Date: Sep 2009
Device: Kindle3, KoboAura&Glo, PB 360 & 902 (Kindle Touch, PRS-600, Opus)
Quote:
Originally Posted by davidfor View Post
I haven't used fetch annotations recently, but I can't say I have ever seen any problems with it.

There are some bugs with the annotation management. This is one of them.
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.[/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.
franklekens is offline   Reply With Quote
Old 09-01-2013, 06:28 AM   #26
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 5,684
Karma: 5656630
Join Date: Jul 2011
Location: Australia
Device: Kobo Touch, Kobo Glo
Quote:
Originally Posted by franklekens View Post
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.
It is possible there was an inconsistency between the annot file and what is in the devices database. Fetch annotations is reading the database, not the files. There are bugs related to this, but, I didn't think they caused any data loss.

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.
davidfor is offline   Reply With Quote
Old 11-22-2013, 04:35 PM   #27
eschwartz
Irrational Optimist
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
Posts: 6,538
Karma: 10990232
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.
eschwartz is offline   Reply With Quote
Old 11-22-2013, 05:09 PM   #28
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 1,304
Karma: 337944
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by davidfor View Post
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.
Since the tool (for windows) is at a somewhat hidden place, here is the link. I only shortly tried the export feature of the new firmware. Therefore, I don't know how the results compare, but I am certain that my tool is more user friendly. (As for information: The tool offers an option to try to repair the database. Since this was written with respect to a specific FW, I would not recommend to use this feature any longer.)
tshering is offline   Reply With Quote
Old 11-22-2013, 07:02 PM   #29
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 5,684
Karma: 5656630
Join Date: Jul 2011
Location: Australia
Device: Kobo Touch, Kobo Glo
Quote:
Originally Posted by eschwartz View Post
For the Kindle, I would just use the Annotations plugin, it works very well. Someone should add compatibility with the Kobo .xml's.
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.
davidfor is offline   Reply With Quote
Old 11-25-2013, 01:44 PM   #30
pakoe
Member
pakoe can illuminate an eclipsepakoe can illuminate an eclipsepakoe can illuminate an eclipsepakoe can illuminate an eclipsepakoe can illuminate an eclipsepakoe can illuminate an eclipsepakoe can illuminate an eclipsepakoe can illuminate an eclipsepakoe can illuminate an eclipsepakoe can illuminate an eclipsepakoe can illuminate an eclipse
 
Posts: 13
Karma: 8020
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 &
If you neither want to use Kobo Tweaks nor fmon, call _annot.sh from /mnt/onboard/.kobo/on_start.sh. Then _annot.html will be refreshed only by restarting the Kobo.
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 http://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 &lt; 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 &auml;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.
pakoe is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre support for Kobo Annotations timlegge Kobo Reader 14 04-23-2013 07:46 PM
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


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


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