View Single Post
Old 04-02-2020, 04:17 AM   #710
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: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by bopuc View Post
Hello!

I just noticed you seem to have changed the HTML markup of the annotations saved in the Calibre database (may have been a while ago, I haven't updated since last October).

I run a script to extract my Annotations from the Calibre database into a separate system and the change has broken this. Specifically you seem to have removed some of the semantics that used to be there, e.g.:"class="user_annotations"", class="timestamp", class="highlight", etc…

Could I ask kindly that you please put that stuff back in? Not only is purely presentational HTML very 1990s, but for those of us who do further processing, having semantic markup makes it possible to parse the HTML out into data again for our own uses.

Pretty please?

I can see, looking at my DB, that you seem to have changed the HTML at least 2-3 times. I'd be happy to help clear this up and fix it if you need a hand!

Pleeeease? I built a huge system based off of Calibre and this plugin *expressly* so I can do stuff with my Annotation. This change breaks almost a decade of work… :\

(Also noticed that what is stored in the DB is not what is rendered in the Calibre "Edit Metadata" view for books. The database still holds the old HTML, whereas the View Metadata parses it into the new HTML markup? )
The markup used by the plugin has not changed in any of the ways mentioned. It still generates markup that uses those classes. I have rewritten a lot of code that generates the markup, but, it should have only fixed some errors where the markup was not generated correctly.

What has changed is the editing widget used by calibre for text columns. When you edit and save these columns, the markup is rewritten without these classes and with other changes to the markup. This is a change that came in with calibre 4.0 as the widget used before is no longer supported in the version of Qt that calibre now uses. There have been some changes since, so the markup after editing is a little different than in 4.0. There is absolutely nothing I can do about this.
davidfor is offline   Reply With Quote