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

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old Yesterday, 08:31 PM   #886
Atcold
Member
Atcold began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jan 2021
Device: Kindle Paperwhite
Red face Yay, it works! Now I can import this to Notion! :D

Quote:
Originally Posted by davidfor View Post
Yes, calibre version 5 uses Python 3. There are differences in the language and the plugins needed to be updated to handle this. A lot is backwardly compatible with Python 2 but some things need to be handled for each version. At the moment, I am maintaining compatibility with older calibre versions of calibre. I broke the compatibility with a change, and then broke everything fixing that.

We're talking about the buggy sorting, right? Can you expand a little (or link the diff)?

Quote:
So, in the attached beta I have change the way to get the list of books. […] It should be accurate as it uses a calibre search to get the books on the device that are in the library and then uses other calibre functions to get the path to the book. This should work better than the existing method. Unfortunately, I have no way to test it. I don't have a Kindle or a good way to simulate it. The code should be good, but, there might be something. Please run it and send me the debug lot to look at.
Awesome! I cannot see anything, but it works!
Click image for larger version

Name:	Screenshot 2021-01-26 at 19.23.46.png
Views:	14
Size:	370.4 KB
ID:	184991
Log: tmp848au2i5.txt.zip
Atcold is offline   Reply With Quote
Old Yesterday, 10:11 PM   #887
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: 20,902
Karma: 36705894
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Atcold View Post
We're talking about the buggy sorting, right? Can you expand a little (or link the diff)?
In that particular case, I was talking about how the My Clippings.txt file is read. With the move to Python 3, strings, unicode, UTF etc are handled differently. Add that some My Clippings.txt files seem to have different formatting and at least one has unicode BOM characters in a location I wouldn't have expected them (but sort of make sense), I have been going back and forth on where and how to decode the file. I changed it to as part of the open of the file, but, that parameter is not part of the Python 2 file open. I put out a beta with that, it broke the plugin under calibre 4.x. When I fixed it, I only did half the job. It probably worked for calibre 4.x, but, for calibre 5.x, it would not have found read the My Clippings.txt file properly and would not have found any annotations. Which is part of what was happening for you.

I haven't checked these changes in. I generally only do that when I make the actual release. It's a bit lazy of me, but, it is the way I work. If you want to look at the code, it is in "ParseKindleMyClippingsTxt.py", method "FromFileName" and the start of "FromFileName"
Quote:
Awesome! I cannot see anything, but it works!
Attachment 184991
That looks good. But, it also says that you have only three books on the device that match to books in the library (have the green tick next to them). And the other five books that have annotations don't show as matched. Is that correct?

If so, you can fix this in the device view. Right-click (or whatever the equivalent on a MAC is) on an unmatched book and choose the "Match book to library" option. On the dialog that comes up, search for the book, select it and press OK to update the list. When finished matching them, right-click the device button and choose "Update cached metadata on device". This will update the metadata.calibre file on the device and calibre will match the book to the library in the future.
Quote:
Log: Attachment 184990
That's horrible. If you click the "Hide match status" it will use the default list colours and should be more readable. Someone did report this a few weeks ago and I said I wasn't interested. I thought the posted a version of the plugin that did something different with colour, but, it was removed before I had a chance to look at it. I don't know if it simply set colours that were better for dark-mode or did something else. I have to do something for colours in another plugin, so I might visit it here when I have done that.
davidfor is offline   Reply With Quote
Old Today, 12:33 PM   #888
Atcold
Member
Atcold began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jan 2021
Device: Kindle Paperwhite
Smile

Quote:
Originally Posted by davidfor View Post
[…] I put out a beta with that, it broke the plugin under calibre 4.x. When I fixed it, I only did half the job. It probably worked for calibre 4.x, but, for calibre 5.x, it would not have found read the My Clippings.txt file properly and would not have found any annotations. Which is part of what was happening for you.
So, what about the sorting bit? Haha

Quote:
I haven't checked these changes in.
Oh, I thought you were using git / GitHub.

Quote:
That looks good. […] Is that correct?
Yes. The others are Amazon's Kindle books, and their annotations can already be exported through Amazon's system.
I was trying to dump the annotations for Atomic Habits only, which I've sideloaded, and therefore wasn't showing up on Amazon's system. (I wonder if it would have shown in case I would have sent the book to my Kindle via email rather than USB. I guess we'll never know.)

Quote:
That's horrible.
I agree.

Quote:
Someone did report this a few weeks ago and I said I wasn't interested.
I saw that. But I tried to nudge you again anyways.

Quote:
I thought they posted a version of the plugin that did something different with colour, but, it was removed before I had a chance to look at it.
I can still see it. ↓

Quote:
Originally Posted by davidfor View Post
Quote:
Originally Posted by thiago.eec View Post
And just so you know: colors are not well suited for Dark Mode, as seen in the attachment.
Sorry, it's not really a problem I am interested in fixing. It either means coming up with a colour combination that always works, adding code to use different colours depending on the styles, or code to configure the colour choices.
Quote:
I don't know if it simply set colours that were better for dark-mode or did something else.
This is the default on my machine (which is set to work in a dark mode).

Quote:
I have to do something for colours in another plugin, so I might visit it here when I have done that.
Nice. Let me know if I can help. (Btw, the website does not notify me about updates, so I'm not sure how to be responsive.)
Also, what other plugins are you involved in? I'm curious now
Atcold 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
[GUI Plugin] KindleUnpack - The Plugin DiapDealer Plugins 464 01-04-2021 07:38 PM
[GUI Plugin] Open With kiwidude Plugins 372 10-31-2020 11:15 AM
[GUI Plugin] Annotations (closed) GRiker Plugins 68 06-17-2014 07:11 AM
[GUI Plugin] KiNotes -axel- Plugins 0 07-14-2013 07:39 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 01:27 PM


All times are GMT -4. The time now is 07:20 PM.


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