![]() |
#2716 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,018
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
currentchap/totalchap will only work for FanFicFare-downloaded stories. For regular books the file-structure varies too much to be reliably detectable with a regex.
Code:
program: input = $#kobobookmark; # Don't change this to 'count' as that's a function ccount = $$#chaptercount; if ## Checks that a Fanfiction has a Kobo bookmark and is not anthology|oneshot ## If you don't use a booktype-column, change this to check something else like a fandom column. $#booktype=='Fanfiction' && substr(input, 0, 10) == 'OEBPS/file' && !$#fanficstatus in 'Anthology,Oneshot' then ## Extracts the 'current chapter' from the bookmarks, subtracts 1, and then formats them as 'currentchap/totalchap' strcat(format_number(re(input, '.*\/file(\d+).*', '\1') - 1, '{0:,d}'), '/',ccount) ## This will display the regular chapter-count for everything else. else ccount fi |
![]() |
![]() |
#2717 | |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 435
Karma: 572984
Join Date: Jan 2010
Location: Long Island
Device: Kobo Libra 2, Kindle 4, Nook Gl4, Nook STR, REB 1100, Ebookwise 1500,
|
Quote:
Although I may change the column name since Status, to me, indicates Unread, Reading, Finished. And for $#booktype=='Fanfiction' I have a column called #library that is 'Text, but with a set of permitted values' wherein the values are Fanfic, Fiction, Non-Fiction. Would that work? |
|
![]() |
![]() |
#2718 | |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,018
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Quote:
#library=='Fanfic' should work, yes. My #booktype is the same column type (enumerated). You can safely remove the fanficstatus line, but this will result in the template showing the wrong result for FFF anthologies. |
|
![]() |
![]() |
#2719 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 435
Karma: 572984
Join Date: Jan 2010
Location: Long Island
Device: Kobo Libra 2, Kindle 4, Nook Gl4, Nook STR, REB 1100, Ebookwise 1500,
|
I think I have one anthology so it shouldn't be an issue.
Works great. Although I apparently have some fics I know I downloaded with FFF that don't have chapter counts. Oh well, fixing metadata is never done. LOL Thanks for all the help. |
![]() |
![]() |
#2720 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Jul 2023
Device: Kobo Clara 2E
|
I'm having trouble getting annotations to download from the Kobo to Calibre. When downloading the annotations file, it shows blank, and when only downloading a single book's annotations, nothing shows up.
However, when using the Annotations plugin (not Kobo Utilities) it works just fine and annotations are downloaded from the reader to Calibre. Is there some kind of configuration that needs to be done? Is this a known bug with a path to resolution? Thanks! (Oh, and I'm using KoboExtended KePubs converted from mobi.) Last edited by ksignorini; 07-20-2023 at 09:21 AM. Reason: clarification |
![]() |
![]() |
#2721 |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 14,161
Karma: 105212035
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Using Kobo Utilities you select an ebook when Kobo connected and select Copy Annotation and it opens a window. You then copy/paste to a text editor (Notepad++ in Windows or WINE, KATE or similar in Linux), and then you can save a file.
The Annotations plugin copies the annotation into Calibre's book record. I've used the Kobo Utilities method maybe over 1000 times with no issue except once when Kobo database was corrupt. The Kobo Utilities method by default doesn't directly create a file or add the data to Calibre. |
![]() |
![]() |
#2722 | |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Jul 2023
Device: Kobo Clara 2E
|
Quote:
If I use the Annotations plug-in on the same book, I can see it has annotations and get them imported into Calibre. |
|
![]() |
![]() |
#2723 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Aug 2023
Device: Kobo Touch
|
403 error updating
getting a similiar 403 error referenced a few pages back with a Kobo touch. Calibre 6.23.0 and kobo plugin 2.16.10. Correctly sees the available update but fails on update.
calibre, version 6.23.0 (win32, embedded-python: True) Failed to update Kobo firmware: Failed: Downloading Kobo firmware update HTTP Error 403: Forbidden Traceback (most recent call last): File "calibre\gui2\device.py", line 104, in run File "calibre_plugins.koboutilities.jobs", line 123, in do_check_firmware_update File "urllib\request.py", line 216, in urlopen File "urllib\request.py", line 525, in open File "urllib\request.py", line 634, in http_response File "urllib\request.py", line 563, in error File "urllib\request.py", line 496, in _call_chain File "urllib\request.py", line 643, in http_error_default urllib.error.HTTPError: HTTP Error 403: Forbidden |
![]() |
![]() |
#2724 |
Member
![]() Posts: 10
Karma: 10
Join Date: Aug 2023
Device: Kobo Libra 2
|
I recently purchased a Libra 2. I am very glad to find this plug-in. It works quite well. Thanks a lot. I encounter several issues about annotation export. I hope you can help me.
1. Unable to copy/backup annotation for books not sideloaded from Calibre or purchased books: "Copy Annotations for selected books" and "Back up annotation file" don't show up on "Device" view for any books including books sideloaded from Calibre. The only option I have is "Remove annotation file". Those two options show up on "Calibre Library" view. Since books sideloaded by other means and purchased books are not on "Calibre Library" view, I cannot export annotations. 2. "Copy annotation file" doesn't work After I selected a folder and clicked OK, I didn't see any file being saved. Here is the dialog after I clicked OK. 3. The annotation seems to get the "chapter" numbers wrong. It seems that it counts entries in the TOC after "cover" as chapter numbers. For example, in the screenshot below, "Introduction" is as "Chapter 6", and "The Limits of Consciousness" as "Chapter 13". They are actually under chapters 1 and 2 in the TOC. There are 7 (13-6) entries (sub-chapters) in the TOC between those two highlights. Thanks again for your help. |
![]() |
![]() |
#2725 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 102
Karma: 8592
Join Date: Aug 2023
Location: New Zealand
Device: Kobo Clara HD, Kobo Libra Colour
|
I'm getting this exception when syncing reading positions:
Code:
calibre, version 6.24.0 (linux, embedded-python: False) Failed to get reading positions: Failed: Storing reading positions for 1330 books [Errno 11] write could not complete without blocking Traceback (most recent call last): File "/usr/lib/calibre/calibre/gui2/device.py", line 104, in run self.result = self.func(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "calibre_plugins.koboutilities.jobs", line 355, in do_store_locations debug_print(job.details) File "calibre_plugins.koboutilities.jobs", line 44, in debug_print prints('DEBUG: %6.1f'%(time.time()-BASE_TIME), *args) File "/usr/lib/calibre/calibre/prints.py", line 39, in prints stream.write(x) BlockingIOError: [Errno 11] write could not complete without blocking |
![]() |
![]() |
#2726 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,424
Karma: 169098492
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
I'd tend to suspect that @chaley enabled debug logging while working on the plugin and forget to turn it off for the release version. It's happened before, often when the person working on the plugin was not the original author and will likely happen again.
|
![]() |
![]() |
#2727 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,449
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Wasn't me. @davidfor tended to leave debugging on, depending on calibre usually running without debugging to avoid the output problems. I understand the position, because without it debugging user reported problems is very hard.
|
![]() |
![]() |
#2728 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,424
Karma: 169098492
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
I remember that. On one occasion during one of the Kobo betas, it caused some rather massive logs.
|
![]() |
![]() |
#2729 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 102
Karma: 8592
Join Date: Aug 2023
Location: New Zealand
Device: Kobo Clara HD, Kobo Libra Colour
|
Yeah, it's certainly pretty verbose, hence this issue. I noticed that the plugin also imports a "DEBUG" variable from "calibre.constants", although I'm not sure where you would set that. Maybe the plugin should have an "enable debug logging" option rather than always enabling it. There should also be a way to log in a way to doesn't cause this issue. I just hope that I won't have to manually edit the plugin after every update.
|
![]() |
![]() |
#2730 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,382
Karma: 27756918
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That error indicates STDOUT in whatever environment you are running calibre in is non-blocking. This is not normal. Find out why that is and fix it and you will be fine. Or redirect STDOUT and STDERR to /dev/null when launching calibre.
|
![]() |
![]() |
Tags |
calibre, kobo, kobo utilities, kobo-utilities, plugins |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] Manga plugin | mastertea | Plugins | 6 | 01-06-2022 02:43 AM |
[GUI Plugin] Save Virtual Libraries To Column (GUI) | chaley | Plugins | 14 | 04-04-2021 05:25 AM |
Kobo Utilities Plugin Question | nikev | Kobo Reader | 10 | 09-25-2018 11:55 PM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 12:27 PM |