Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 02-27-2023, 11:47 AM   #2851
Katja_hbg
Groupie
Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.
 
Posts: 183
Karma: 158116
Join Date: Oct 2015
Device: Kobo Glo HD (landscape), Kobo Aura One
Quote:
Originally Posted by isarl View Post
You're so close! There's no need to give up when you're so close.
Thanks for your patience - now two-third is done ;-) it works as expected.
But ... if you still have time and interest ... I like to exclude values from two fields and do not know how to join that in the template.

- old setting of collection columns: tags, #readingpool, #fivestar
- target is to reduce tags and readingpool.

- collection columns is now: #fivestar
- template to reduce "readingpool" (leicht/danach) works well.
program:
# Remove tags listed in tags_to_ignore
tags_to_ignore = 'danach, leicht, stopped';
list_join(':@:', list_difference($#readingpool, tags_to_ignore, ','), ',')

How to combine
list_join(':@:', list_difference($#readingpool, tags_to_ignore, ','), ',')
list_join(':@:', list_difference($tags, tags_to_ignore, ','), ',')
Katja_hbg is offline   Reply With Quote
Old 02-27-2023, 11:53 AM   #2852
isarl
Addict
isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.
 
Posts: 287
Karma: 2534928
Join Date: Nov 2022
Location: Canada
Device: Kobo Aura 2
Quote:
Originally Posted by Katja_hbg View Post
How to combine
list_join(':@:', list_difference($#readingpool, tags_to_ignore, ','), ',')
list_join(':@:', list_difference($tags, tags_to_ignore, ','), ',')

list_join takes an arbitrary number of lists to join, so simply add the second list_difference() function call as another argument to the first list_join. Like this:

Code:
   list_join(':@:',
        list_difference($#readingpool, tags_to_ignore, ','), ',',
        list_difference($tags, tags_to_ignore, ','), ',')
If you wanted to do another column as well then you could expand it further. For example:

Code:
   list_join(':@:',
        list_difference($#readingpool, tags_to_ignore, ','), ',',
        list_difference($tags, tags_to_ignore, ','), ',',
        list_difference($#othercolumn, tags_to_ignore, ',')
Obviously(?) you can do whatever processing you like, it doesn't have to be a call to list_difference. You'll notice that these examples look very similar to chaley's above, where the #genre and #collections columns are used as-is (they are not wrapped in a call to the list_difference function). But if you are trying to remove the same tags from each list then the above works great!

Last edited by isarl; 02-27-2023 at 12:57 PM. Reason: call more attention to the similarities between this answer and chaley's, above
isarl is offline   Reply With Quote
Advert
Old 02-27-2023, 12:34 PM   #2853
Katja_hbg
Groupie
Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.
 
Posts: 183
Karma: 158116
Join Date: Oct 2015
Device: Kobo Glo HD (landscape), Kobo Aura One
Quote:
Originally Posted by chaley View Post
My personal choice would be to do it all in the template and leave "Collections Columns" empty/unchecked. That way I have only one place to look and I can more easily fine tune the results.
[/CODE]
In general I totally agree that this would be the best way. But I did not really understand what I did till I got the different answers from @isarl.
Finally all works now as expected and I will not touch anymore.

That was a nice day with a great result.
Thanks again to both of you for your support (also thanks to David posthomous for his PI).
Now I can spend some time in reading.
Katja_hbg is offline   Reply With Quote
Old 02-27-2023, 01:29 PM   #2854
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,450
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by isarl View Post
Code:
   list_join(':@:',
        list_difference($#readingpool, tags_to_ignore, ','), ',',
        list_difference($tags, tags_to_ignore, ','), ',')
...
Obviously(?) you can do whatever processing you like, it doesn't have to be a call to list_difference.
It is possible that you might want to distinguish between the two columns when looking at collections on the Kobo. It is also possible that the two columns contain the same value but with a different meaning, raising the importance of distinguishing the item values shown on the Kobo.

This template, derived from the above, adds a column name as a prefix to the column value: "Tag:" for tags and "Genre:" for #genre. (I used #genre because that is a column I have, permitting me to test the template before posting.)
Code:
program:
	tags_to_ignore = 'danach, leicht, stopped';
	genres_to_ignore = 'fiction, general';
	list_join(':@:',
		list_re(
			list_difference($#genre, genres_to_ignore, ','),
			',', '(^.*$)', 'Genre:\1'),
		',',

		list_re(
			list_difference($tags, tags_to_ignore, ','),
			',', '(^.*$)', 'Tag:\1'),
		',')
The Kobo sorts the collection names so all the Genre:-prefixed items will appear before the Tag:-prefixed items.
chaley is offline   Reply With Quote
Old 03-06-2023, 10:17 PM   #2855
Liudprand
Zealot
Liudprand began at the beginning.
 
Posts: 133
Karma: 10
Join Date: Nov 2021
Device: Kobo Libra 2
"Error communicating with device", "Failed to process", when trying to upload book

I'm having trouble uploading a particular book to my Kobo Libra 2, using KTE 3.6.3 in Calibre.

The weird thing is, it uploaded fine a few months ago. For various reasons I've removed a lot of books from the device and then re-uploaded them. With all the others, there have been no problems at all - or else, in just one or two cases, problems that have been fixed by converting from epub to epub, etc. (crude, I know - but it usually works!). The details of the error are as follows:

calibre, version 6.13.0
ERROR: Error: Error communicating with device

Failed to process [NAME OF BOOK]

Traceback (most recent call last):
File "calibre_plugins.kobotouch_extended.device.driver" , line 268, in _modify_epub
File "calibre_plugins.kobotouch_extended.common", line 236, in modify_epub
File "calibre_plugins.kobotouch_extended.container" , line 398, in convert
File "calibre_plugins.kobotouch_extended.container" , line 394, in __run_async_over_content
File "calibre_plugins.kobotouch_extended.container" , line 381, in __run_async
File "calibre_plugins.kobotouch_extended.container" , line 377, in __run_async
File "concurrent\futures\_base.py", line 447, in result
concurrent.futures._base.TimeoutError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "calibre\gui2\device.py", line 104, in run
File "calibre\gui2\device.py", line 636, in _upload_books
File "calibre_plugins.kobotouch_extended.device.driver" , line 426, in upload_books
File "calibre\devices\kobo\driver.py", line 2217, in upload_books
File "calibre_plugins.kobotouch_extended.device.driver" , line 294, in _modify_epub
File "calibre_plugins.kobotouch_extended.device.driver" , line 268, in _modify_epub
File "calibre_plugins.kobotouch_extended.common", line 236, in modify_epub
File "calibre_plugins.kobotouch_extended.container" , line 398, in convert
File "calibre_plugins.kobotouch_extended.container" , line 394, in __run_async_over_content
File "calibre_plugins.kobotouch_extended.container" , line 381, in __run_async
File "calibre_plugins.kobotouch_extended.container" , line 377, in __run_async
File "concurrent\futures\_base.py", line 447, in result
concurrent.futures._base.TimeoutError: Failed to process [NAME OF BOOK]

As I said, KTE had no trouble at all with the book a few months ago. Could it be an issue with an update of the plugin?

If anyone has any suggested workarounds, I'd be very grateful.
Liudprand is offline   Reply With Quote
Advert
Old 03-06-2023, 10:19 PM   #2856
Liudprand
Zealot
Liudprand began at the beginning.
 
Posts: 133
Karma: 10
Join Date: Nov 2021
Device: Kobo Libra 2
Quote:
Originally Posted by Liudprand View Post
I'm having trouble uploading a particular book to my Kobo Libra 2, using KTE 3.6.3 in Calibre.

The weird thing is, it uploaded fine a few months ago. For various reasons I've removed a lot of books from the device and then re-uploaded them. With all the others, there have been no problems at all - or else, in just one or two cases, problems that have been fixed by converting from epub to epub, etc. (crude, I know - but it usually works!). The details of the error are as follows:

calibre, version 6.13.0
ERROR: Error: Error communicating with device

Failed to process [NAME OF BOOK]

Traceback (most recent call last):
File "calibre_plugins.kobotouch_extended.device.driver" , line 268, in _modify_epub
File "calibre_plugins.kobotouch_extended.common", line 236, in modify_epub
File "calibre_plugins.kobotouch_extended.container" , line 398, in convert
File "calibre_plugins.kobotouch_extended.container" , line 394, in __run_async_over_content
File "calibre_plugins.kobotouch_extended.container" , line 381, in __run_async
File "calibre_plugins.kobotouch_extended.container" , line 377, in __run_async
File "concurrent\futures\_base.py", line 447, in result
concurrent.futures._base.TimeoutError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "calibre\gui2\device.py", line 104, in run
File "calibre\gui2\device.py", line 636, in _upload_books
File "calibre_plugins.kobotouch_extended.device.driver" , line 426, in upload_books
File "calibre\devices\kobo\driver.py", line 2217, in upload_books
File "calibre_plugins.kobotouch_extended.device.driver" , line 294, in _modify_epub
File "calibre_plugins.kobotouch_extended.device.driver" , line 268, in _modify_epub
File "calibre_plugins.kobotouch_extended.common", line 236, in modify_epub
File "calibre_plugins.kobotouch_extended.container" , line 398, in convert
File "calibre_plugins.kobotouch_extended.container" , line 394, in __run_async_over_content
File "calibre_plugins.kobotouch_extended.container" , line 381, in __run_async
File "calibre_plugins.kobotouch_extended.container" , line 377, in __run_async
File "concurrent\futures\_base.py", line 447, in result
concurrent.futures._base.TimeoutError: Failed to process [NAME OF BOOK]

As I said, KTE had no trouble at all with the book a few months ago. Could it be an issue with an update of the plugin?

If anyone has any suggested workarounds, I'd be very grateful.
Apologies: this seems to have been posted as a reply in an unrelated thread. Problem is, I can't see a button to submit a new query/thread, only "new reply", so that's what I did. So, if this is in the wrong place, again, my apologies...
Liudprand is offline   Reply With Quote
Old 03-06-2023, 10:51 PM   #2857
Liudprand
Zealot
Liudprand began at the beginning.
 
Posts: 133
Karma: 10
Join Date: Nov 2021
Device: Kobo Libra 2
Here's the epub file (scrambled).
Attached Files
File Type: epub Problem book_scrambled.epub (1.71 MB, 95 views)
Liudprand is offline   Reply With Quote
Old 03-07-2023, 07:11 AM   #2858
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,450
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Liudprand View Post
Here's the epub file (scrambled).
The problem: KTE allows 10 seconds to process a file in a book, and this book is taking longer than that. I can't say more because you didn't include the rest of the log in your post, which according to what I see in the code would tell us which html file failed.

Possible workarounds:
  • Send only this book
  • Ensure that no other program is using the processor.
  • If you have the option, ensure that the processor is running at full speed.

I attached a version of KTE that extends the timeout to 30 seconds. I don't use this driver so I can't test it. I don't know what ramifications the changes might have.

The above notwithstanding, I am confident the changes didn't break anything. If you want to give it a try then have at it. I will consider releasing it if more people try it without problems.

If this version doesn't fix your problem, please provide the entire log.

Edit: Actually, I won't release anything. @jgoguen should do that.

Edit2: Deleted the test version

Last edited by chaley; 03-10-2023 at 01:29 PM. Reason: Deleted test version
chaley is offline   Reply With Quote
Old 03-07-2023, 09:01 AM   #2859
Liudprand
Zealot
Liudprand began at the beginning.
 
Posts: 133
Karma: 10
Join Date: Nov 2021
Device: Kobo Libra 2
Thanks for this.

I just tried this again - having tried maybe 10 times yesterday - and for some reason it worked fine!

I was going to try and send you the "full log" - though I'm not 100% sure what you mean. I copied and pasted everything in the error message, but I'm not sure if that's the same thing.

Anyway, thanks for the attachment. I'll try it in future if I have the same problem again.
Liudprand is offline   Reply With Quote
Old 04-06-2023, 04:53 AM   #2860
maddz
Wizard
maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.
 
Posts: 1,405
Karma: 30039536
Join Date: Mar 2010
Location: UK
Device: Kobo Forma, Icarus, iPad Mini 2, Kobo Touch, Google Nexus 7
I’ve recently upgraded to Calibre 6 (Mac OS) and am having problems with the save to device template on the drivers. I mistakenly set it to {series} / {#subseries} / {title} / {author} and updated metadata. This produces a very untidy booklist on my Forma, so I reset it to {title} and updated metadata again. Now every time I import new content, the booklist reverts to the untidy format and I have to select the entire library and update metadata again.

This was originally with the Kobo Touch driver; I’ve now installed the Kobo Touch Extended driver as well and still get the problem. Have I missed somewhere else I need to configure this?
maddz is offline   Reply With Quote
Old 04-06-2023, 05:01 AM   #2861
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 11,036
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Delete the books on your device and re-send them.
ownedbycats is online now   Reply With Quote
Old 04-06-2023, 05:11 AM   #2862
maddz
Wizard
maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.
 
Posts: 1,405
Karma: 30039536
Join Date: Mar 2010
Location: UK
Device: Kobo Forma, Icarus, iPad Mini 2, Kobo Touch, Google Nexus 7
Quote:
Originally Posted by ownedbycats View Post
Delete the books on your device and re-send them.
I was hoping to avoid that as I have a number of books on my device for which I will have to retrieve the PDFs from an archive…
maddz is offline   Reply With Quote
Old 04-09-2023, 05:58 PM   #2863
nekue
Junior Member
nekue began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Apr 2023
Device: Kobo Aura One
Hi, First of all thank you very much for your work.

I have a Kobo Aura One and in some ebooks, in .epub format, the images that come inside, for example maps or illustrations, are small and there is no way to zoom them.

Do you think that converting .epub to .kepub with this add-on will solve the problem and they can occupy the whole screen?

Thanks for your help, I tried to search on the topic before asking, but there are many pages and I haven't seen anything about this.
nekue is offline   Reply With Quote
Old 04-09-2023, 06:57 PM   #2864
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,544
Karma: 169115148
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by nekue View Post
Do you think that converting .epub to .kepub with this add-on will solve the problem and they can occupy the whole screen?

Thanks for your help, I tried to search on the topic before asking, but there are many pages and I haven't seen anything about this.
The images will likely look the same size but Kepub will allow you to zoom the images. OTOH, if the images are low resolution, you will get pixelated garbage.

It would probably be easier in the long run to edit the books and correct the image display. For large images, I use an svg wrapper to display them full screen though this can require rotating the image.
DNSB is offline   Reply With Quote
Old 04-09-2023, 07:27 PM   #2865
nekue
Junior Member
nekue began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Apr 2023
Device: Kobo Aura One
Quote:
Originally Posted by DNSB View Post
The images will likely look the same size but Kepub will allow you to zoom the images. OTOH, if the images are low resolution, you will get pixelated garbage.

It would probably be easier in the long run to edit the books and correct the image display. For large images, I use an svg wrapper to display them full screen though this can require rotating the image.
Thanks, David. I'm going to try it with a ebook
nekue is offline   Reply With Quote
Reply

Tags
error, kobo aura one


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kobo Device Driver Update davidfor Devices 284 05-24-2019 05:24 PM
[Device Plugin] Kindle 2, 3, 4, Touch Device Interface MBP Update Mod cryzed Plugins 7 10-28-2012 04:58 PM
[Device Interface Plugin] Update for Nook Color Driver jmricker Plugins 0 10-22-2011 10:11 AM
Touch Kobo Touch Extended 2 Year Warranty - Is it worth the $34.99? EverC Kobo Reader 11 08-31-2011 11:47 PM
Touch Kobo Touch Extended Warranty Program SensualPoet Kobo Reader 1 07-17-2011 04:08 AM


All times are GMT -4. The time now is 05:39 PM.


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