View Single Post
Old 06-19-2018, 04:38 AM   #411
Gergely
Member
Gergely understands when you whisper 'The dog barks at midnight.'Gergely understands when you whisper 'The dog barks at midnight.'Gergely understands when you whisper 'The dog barks at midnight.'Gergely understands when you whisper 'The dog barks at midnight.'Gergely understands when you whisper 'The dog barks at midnight.'Gergely understands when you whisper 'The dog barks at midnight.'Gergely understands when you whisper 'The dog barks at midnight.'Gergely understands when you whisper 'The dog barks at midnight.'Gergely understands when you whisper 'The dog barks at midnight.'Gergely understands when you whisper 'The dog barks at midnight.'Gergely understands when you whisper 'The dog barks at midnight.'
 
Posts: 19
Karma: 42210
Join Date: May 2018
Device: Kobo Aura H2O
Highlighting text in an epub

Followup to

https://www.mobileread.com/forums/sh...=1#post3708168

My goal is to write a plugin that imports highlighting information from my Kobo Aura H20 reader, especially from its sqlite database. Using python to extract data from an sqlite database should be straightforward and is not a concern here.

To put the highlighting manually I have inserted span tags with class "highlighting" and inserted

span.highlight { background: #ccc }

into publisher CSS.

In the above post I have managed to do this manually, and Icecream ebook reader software did show my modification.

I would like to do this with a Sigil plugin automatically.

I have skimmed through

https://github.com/Sigil-Ebook/Sigil...work_rev8.epub

but it was not clear how could I

* search for the text to be highlighted in all of the html files

* insert span and /span to the proper position

* insert my one-line CSS into the proper style file

Could you help me what part of the BookContainer class should I use?
Gergely is offline   Reply With Quote