![]() |
#376 | ||
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
Quote:
|
||
![]() |
![]() |
![]() |
#377 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Looking at the book and annotations matching, there are two probable reasons:
- Cannot match the title information in the "My Clippings.txt" with a book in the calibre library. - Parsing the annotation record doesn't work. For the latter problem, the debug log should show an entry like: Code:
DEBUG: 31.0 ParseKindleMyClippingsTxt ERROR: could not detect type of record 'Markierung Pos. 103 | Hinzugefügt am Freitag, 10. Juni 2016 20.48 Uhr GMT+01:01' For the title match, the plugin is comparing the title from the annotation with the titles of books it thinks are on the device. This is a simple equality, so there might be some issues there. Also, I just noticed it has two lists of formats. For sideloaded books, they need to have formats in "[u'azw', u'azw1', u'azw3', u'mobi']" and for synced books, extensions in "['*.azw', '*.mobi', '*.pobi']". When it is looking for books, it uses these. I assume neither of those lists is up to date. |
![]() |
![]() |
Advert | |
|
![]() |
#378 | ||
Member
![]() Posts: 21
Karma: 10
Join Date: Aug 2017
Device: Kindle 2. Gen
|
Quote:
Quote:
![]() (I had to add some spaces to prevent some parts being converted to smileys.) |
||
![]() |
![]() |
![]() |
#379 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
Code:
date_time_re = r'([0-2]?[0-9]):([0-5][0-9])(?::([0-5][0-9])(?:\.([0-9]+))?)?\s*([AP]\.?M)?\s*(?:[A-Z]{3}?([+-][0-2]?[0-9](?::[0-5][0-9])?))?' Code:
- Markierung Pos. 4921-27 | Hinzugefügt am Montag, 5. Mai 2014 6.49 Uhr GMT+01:01 - La tua evidenziazione alla posizione 750-750 | Aggiunto in data venerdì 4 settembre 2015 07:44:20 The month selection then fails for the Italian version as it the selection is looking for either a comma or semi-colon to separate the date from preamble on the line. The German version should work if the time was extracted properly. |
|
![]() |
![]() |
![]() |
#380 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Ok, changing the regex to:
Code:
date_time_re = r'([0-2]?[0-9])[.:]([0-5][0-9])(?::([0-5][0-9])(?:\.([0-9]+))?)?\s*([AP]\.?M|Uhr)?\s*(?:[A-Z]{3}?([+-][0-2]?[0-9](?::[0-5][0-9])?))?' And looking at the log file, the grouping of errors isn't obvious. There is some indentation, but the above isn't indented properly. The following are how they should be grouped: Code:
DEBUG: 156.7 title==Kulturgeschichte der Neuzeit (German Edition) DEBUG: 156.7 Found book_id=-16 DEBUG: 156.7 Unable to parse entries from 'My Clippings.txt' |
![]() |
![]() |
Advert | |
|
![]() |
#381 | |||
Enthusiast
![]() Posts: 36
Karma: 10
Join Date: Aug 2017
Location: Aosta (Italy)
Device: Kindle Voyage
|
New findings for Italian annotations
Quote:
I found something about it: old annotations, dating up to May 2014, look like this: Quote:
Quote:
I will try to adapt the regular expression to match both otherwise either is it possible to easily add an option or please consider matching the latter case. Thanks, together we are nearing to the solution ![]() Dario |
|||
![]() |
![]() |
![]() |
#382 | |
Enthusiast
![]() Posts: 36
Karma: 10
Join Date: Aug 2017
Location: Aosta (Italy)
Device: Kindle Voyage
|
Quote:
Dario |
|
![]() |
![]() |
![]() |
#383 | |
Enthusiast
![]() Posts: 36
Karma: 10
Join Date: Aug 2017
Location: Aosta (Italy)
Device: Kindle Voyage
|
Quote:
And, would'nt it be possible to match only the first part of the title? When I import a book in the Calibre library, I usually get rid of some words i.e. '(Italian Edition)' and the like. Thanks, Dario |
|
![]() |
![]() |
![]() |
#384 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
Also, I realised I was wrong about the matching for Italian. It should be working. But, the example file you sent, the month for a lot of the entries is "Luglio". The code I have has this in lower case only. That will break the parsing of the timestamp. Last edited by davidfor; 09-21-2017 at 09:42 AM. |
|
![]() |
![]() |
![]() |
#385 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
![]() Quote:
|
|
![]() |
![]() |
![]() |
#386 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Another beta
Here is another beta that attempts to fix the problems discussed in today. The changes include:
Unfortunately, I can't test these changes very well. I don't have a Kindle, so cannot run all of the code. I'm pretty sure there are no typos or anything to stop them running. Whether it does what it is supposed to do it the question. Please test and tell me how it goes. If there are problems, I'd like to see a debug log and the "My Clippings.txt" file. |
![]() |
![]() |
![]() |
#387 | |
Enthusiast
![]() Posts: 36
Karma: 10
Join Date: Aug 2017
Location: Aosta (Italy)
Device: Kindle Voyage
|
David,
now the plugin is broken: when I select 'Fetch annotations' I get the following error (exctly as you see it, with those special characters): Quote:
I can assure you that the previous beta works and I have not added any books neither to library nor to the device in the meanwhile. Attached are the CalibreLog and also an updated italian translation. For the other points you answered previously you are right: in the previous beta the annotations were in fact merged correctly, and I understand your point of view about matching titles, although I often download from Amazon then start to read and highlight, especially when I don't have my computer at hand. Thanks, ciao Dario |
|
![]() |
![]() |
![]() |
#388 | ||||
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
![]() ![]() I'm assuming the books that cause this are KFX. Does calibre show these in the device list, do they match with books in the library and is the metadata displayed correctly? Quote:
Quote:
Quote:
If what you want is the merged annotations, then I think the following will work:
It's not ideal, but I think that will work. If you look at the My Clippings.txt after doing this, I expect you will find the annotations under the two different titles for the book. I know this works for the Kobo devices, but they do the book matching very differently. If it doesn't work, I'd be interested in seeing the clipping file and log to see what has happened. Last edited by davidfor; 09-22-2017 at 07:54 AM. |
||||
![]() |
![]() |
![]() |
#389 | |
Enthusiast
![]() Posts: 36
Karma: 10
Join Date: Aug 2017
Location: Aosta (Italy)
Device: Kindle Voyage
|
Good job David, now I find more annotated books, although not all yet.
I did several experiments but haven't found a satisfying sense of the things at this time. Here I try to tell some: 1) I had a book sideloaded from calibre in mobi format and it didn't get fetched. If I convert the book from mobi to azw3 and substitute this new version on the device its annotations get fetched. Path fetched book after conversion from mobi to azw3: /media/dario/Kindle/documents/Vari, Autori/viaggio chiamato LibreUmbria, Un - Vari, Autori.azw3 previously was: /media/dario/Kindle/documents/Vari, Autori/viaggio chiamato LibreUmbria, Un - Vari, Autori.mobi Calibre title: Un viaggio chiamato LibreUmbria Calibre sorted title: viaggio chiamato LibreUmbria, Un Calibre Authors: Vari, Autori Calibre sorted authors: Vari, Autori but now even if I reload the mobi version its annotations get fetched. 2) I repeated the same procedure for another book, it seems to me the same conditions, but cannot get any annotations. Path not fetched book: /media/dario/Kindle/documents/Chacon, Scott & Ben, Straub/Pro Git - Chacon, Scott & Straub Ben.mobi or /media/dario/Kindle/documents/Chacon, Scott & Ben, Straub/Pro Git - Chacon, Scott & Straub Ben.azw3 Calibre title: Pro Git (second edition) Calibre sorted title: Pro Git Calibre Authors: Chacon, Scott & Straub Ben Calibre sorted authors: Chacon, Scott & Ben, Straub MyClippings.txt (fragment): Quote:
Here sideloading the azw3 version allows to fetch the annotations. Removing the azw3 version from the device, converting it to kfx and sideloading the kfx yeld no annotations, even if I made some new ones. One more thing: I thought Calibre detects book in KFX format since version 2.40 (see: https://calibre-ebook.com/whats-new) but, as you said, maybe it is not the same mechanism used by the plugin. If that would not possible to change it would be sad because on the kindle kfx books looks really improved with respect to appearance, navigation and speed over azw3. Well, I'll collect more cases using the plugin and will report when I have more to say. Thank you and nice week-end, Dario |
|
![]() |
![]() |
![]() |
#390 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Firstly, I had a vague feeling my statement about KFX was wrong, but couldn't see how they were being handled. I have since found out how, and the attached beta should pick them up. Plus, for the other formats, I have changed to another method that should be better over all. And one extra bit of debug output that should tell me what goes wrong.
For the rest, I'm not to surprised by any of that. As KFX books have to be handled differently, they won't have been handled by any previous version of the plugin. For the MOBI/AZW3 swaps, there are things going on with UUIDs in the files that probably explain it. But, I really need to see the debug log. It has information about what the plugin thinks is on the device. What files it sees and what titles it thinks these files have. And I can map that back to the code to work out what is happening. And the complete clippings file will help. As I don't have a Kindle of any sort, I am hamstrung about testing the code. If there is a problem posting this in the thread, then send it in a PM, or upload it somewhere and PM the link. Or send an email to the address in the code. The attached beta should get closer to either getting all the annotations or telling me why they aren't retrieved. This has all been work on code in the Kindle part of the plugin. But, until I know all the annotations are read from the file and the plugin has done it's first pass of matching them to books. |
![]() |
![]() |
![]() |
Tags |
sampleexportingapp |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] KindleUnpack - The Plugin | DiapDealer | Plugins | 523 | 07-15-2025 06:45 PM |
[GUI Plugin] Open With | kiwidude | Plugins | 404 | 02-21-2025 05:42 AM |
[GUI Plugin] Annotations (closed) | GRiker | Plugins | 68 | 06-17-2014 06:11 AM |
[GUI Plugin] KiNotes | -axel- | Plugins | 0 | 07-14-2013 06:39 PM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 12:27 PM |