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 07-29-2018, 10:00 AM   #256
stefano.sb
Member
stefano.sb began at the beginning.
 
Posts: 20
Karma: 10
Join Date: May 2013
Device: Kindle Paperwhite
Patch to import collections from KFX ebooks

Hi NiLuJe,
attached to this post there is a small patch to use Kindle Collections (v1.17.19) to import the collections also for the KFX ebooks. Collections are exported using LibrarianSync

In Calibre Library I added a KFX ebook (ex "book1.kfx") using one of these two options:

1 - KFX Import plug-in (by jhowell)
2 - Adding the book1.azw3 downloaded from my Amazon account and after using "match to books" from device to link book1.kfx to book1.azw3.

Consider that I am a very newby with Python... Each of my changes to your code is enclosed between "# SS START" and "# SS END". Obviously, feel you free to update my "code" as you want

Stefano
Attached Files
File Type: zip Kindle Collections_KFXpatch.zip (14.4 KB, 21 views)
stefano.sb is offline   Reply With Quote
Old 07-29-2018, 11:02 AM   #257
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 7,546
Karma: 7563069
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O
@stefano.sb: Thanks!

I tweaked it a bit, but haven't had time to test it yet.

Does that behave okay?.
NiLuJe is offline   Reply With Quote
Old 07-30-2018, 09:33 AM   #258
stefano.sb
Member
stefano.sb began at the beginning.
 
Posts: 20
Karma: 10
Join Date: May 2013
Device: Kindle Paperwhite
Quote:
Originally Posted by NiLuJe View Post
@stefano.sb: Thanks!

I tweaked it a bit, but haven't had time to test it yet.

Does that behave okay?.
Hi NiLuJe,
my "home made" version works ok on my Calibre. I have seen that in your tweaks (15278, 15279, 15280) you have updated only these three files.
ebook.py
kindle_device.py
kindle_books.py

Is it correct? I ran 1.7.19 version with these 3 update but it doesn't work.. Surely I'm wrong something

Stefano
stefano.sb is offline   Reply With Quote
Old 07-30-2018, 11:10 AM   #259
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 7,546
Karma: 7563069
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O
@stefano.sb: I haven't yet had the chance to test it, so, no, it's entirely possible I messed it up .
NiLuJe is offline   Reply With Quote
Old 07-30-2018, 05:22 PM   #260
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 7,546
Karma: 7563069
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O
@stefano.sb: It was indeed broken .

Does this work properly? It appears to parse stuff properly, but I'm not in position to test the whole linking shenanigan and/or KFX conversions myself, so I may have missed something...

On the upside, I found a massive oversight that basically made the filtering of unsupported formats useless, so, yay.

Last edited by NiLuJe; 07-31-2018 at 11:19 AM. Reason: -> 1.7.20
NiLuJe is offline   Reply With Quote
Old 07-31-2018, 07:13 AM   #261
stefano.sb
Member
stefano.sb began at the beginning.
 
Posts: 20
Karma: 10
Join Date: May 2013
Device: Kindle Paperwhite
Quote:
Originally Posted by NiLuJe View Post
@stefano.sb: It was indeed broken .

Does this work properly? It appears to parse stuff properly, but I'm not in position to test the whole linking shenanigan and/or KFX conversions myself, so I may have missed something...

On the upside, I found a massive oversight that basically made the filtering of unsupported formats useless, so, yay.
Good job, it works!!

I tested it also with a new kfx ebook downloaded from Amazon and imported into Calibre with "KFX input" plug-in

Stefano
stefano.sb is offline   Reply With Quote
Old 07-31-2018, 11:13 AM   #262
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 7,546
Karma: 7563069
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O
@stefano.sb: Fantastic! I'll push a new release, then . Thank you!

EDIT: Done, 1.7.20 is out .

Last edited by NiLuJe; 07-31-2018 at 11:21 AM.
NiLuJe is offline   Reply With Quote
Old 08-27-2018, 05:14 PM   #263
arooni
Connoisseur
arooni began at the beginning.
 
Posts: 82
Karma: 26
Join Date: Jul 2012
Device: kindle keyboard (wifi + 3g)
does the initial import 'import kindle collections into calibre' take a long time? trying to decide whether or not its frozen.

latest version of plugin / 3.27.1 calibre / paperwhite v2

oh finally got an error:

calibre, version 3.27.1
ERROR: Unhandled exception: <b>TypeError</b>:unhashable type: 'list'

calibre 3.27.1 embedded-python: True is64bit: True
Darwin-17.7.0-x86_64-i386-64bit Darwin ('64bit', '')
('Darwin', '17.7.0', 'Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64')
Python 2.7.12
OSX: ('10.13.6', ('', '', ''), 'x86_64')
Interface language: None
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 7, 0) && DeDRM (6, 5, 4) && Package KFX (from KFX Input) (1, 7, 0) && Set KFX metadata (from KFX Output) (1, 22, 0) && KFX Output (1, 22, 0) && Manage Series (1, 2, 8) && Find Duplicates (1, 6, 3) && KFX metadata reader (from KFX Input) (1, 7, 0) && KFX Input (1, 7, 0) && Quality Check (1, 9, 11) && Prettify Cover 0.9.12 && Annotations (1, 8, 0) && Count Pages (1, 8, 2) && X-Ray Creator (3, 1, 2) && Hyphenate This! (0, 0, 8) && Extract ISBN (1, 4, 4) && APNX Generator (1, 1, 0) && Goodreads (1, 1, 14) && Reading List (1, 6, 6) && Kindle Collections (1, 7, 20) && Barnes & Noble (1, 2, 15) && Modify ePub (1, 3, 13) && Goodreads Sync (1, 12, 0)
Traceback (most recent call last):
File "calibre_plugins.kindle_collections.ui", line 173, in import_kindle_collections
File "calibre_plugins.kindle_collections.import_collect ions", line 59, in run
File "calibre_plugins.kindle_collections.kindle_boo ks", line 37, in init
File "calibre_plugins.kindle_collections.kindle_boo ks", line 60, in __init__
File "calibre_plugins.kindle_collections.kindle_boo ks", line 358, in load_kindle_books
TypeError: unhashable type: 'list'
arooni is offline   Reply With Quote
Old 08-27-2018, 05:21 PM   #264
arooni
Connoisseur
arooni began at the beginning.
 
Posts: 82
Karma: 26
Join Date: Jul 2012
Device: kindle keyboard (wifi + 3g)
also running into this when trying to create kindle collections:

unhashable type: 'list'

Traceback (most recent call last):
File "site-packages/calibre/gui2/device.py", line 87, in run
File "calibre_plugins.kindle_collections.create_preview ", line 67, in create
File "calibre_plugins.kindle_collections.kindle_boo ks", line 37, in init
File "calibre_plugins.kindle_collections.kindle_boo ks", line 60, in __init__
File "calibre_plugins.kindle_collections.kindle_boo ks", line 358, in load_kindle_books
TypeError: unhashable type: 'list'
arooni is offline   Reply With Quote
Old 08-28-2018, 11:58 AM   #265
rolgiati
Connoisseur
rolgiati knows the complete value of PI to the endrolgiati knows the complete value of PI to the endrolgiati knows the complete value of PI to the endrolgiati knows the complete value of PI to the endrolgiati knows the complete value of PI to the endrolgiati knows the complete value of PI to the endrolgiati knows the complete value of PI to the endrolgiati knows the complete value of PI to the endrolgiati knows the complete value of PI to the endrolgiati knows the complete value of PI to the endrolgiati knows the complete value of PI to the end
 
Posts: 86
Karma: 31214
Join Date: May 2011
Location: Asuncion (Paraguay)
Device: Several Kindle 3 KB's
Kindle Collections plug-in error

Having broken the screen on my Kindle-3-keyboard, and until a spare arrives from Distant China, I have:
-Connected the K3 to my Linux desktop machine, and copied everything from /media/Kindle to a temporary directory.
-Disconnected the broken K3, and connected the spare.
-Deleted everything on the spare K3
-Copied everything from the temp directory to the spare K3.

Collections would not display, so I dug a bit on the forum, restarted the K3 and Bingo!, the collections work.

While I was connected, I tried to use the Collections plug-in to put a few things in order and got an error message:
Code:
calibre, version 3.27.1
ERROR: Unhandled exception: <b>AttributeError</b>:'BookList' object has no attribute 'rebuild_collections'

calibre 3.27.1  embedded-python: True is64bit: True
Linux-3.16.0-5-amd64-x86_64-with-debian-7.11 Linux ('64bit', 'ELF')
('Linux', '3.16.0-5-amd64', '#1 SMP Debian 3.16.51-3+deb8u1 (2018-01-08)')
Python 2.7.12
Linux: ('debian', '7.11', '')
Interface language: en_GB
Traceback (most recent call last):
  File "site-packages/calibre/gui2/actions/edit_collections.py", line 38, in edit_collections
  File "site-packages/calibre/gui2/actions/edit_metadata.py", line 725, in edit_device_collections
  File "site-packages/calibre/gui2/device.py", line 1608, in upload_collections
  File "site-packages/calibre/gui2/device.py", line 551, in upload_collections
AttributeError: 'BookList' object has no attribute 'rebuild_collections'
Trying to see what could be the problem, I swapped K3s, and now got the same error as on the broken one.

Before all this, the plug-in worked on the (now-)broken K3.

Any idea ?

Calibre 3.27.1
Collections plugin 1.7.20
rolgiati is offline   Reply With Quote
Old 08-28-2018, 10:31 PM   #266
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 33,395
Karma: 10205094
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
you should post in the thread for that plugin, there it is more likely to get attention
kovidgoyal is online now   Reply With Quote
Old 08-29-2018, 01:41 AM   #267
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 10,814
Karma: 10563066
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by kovidgoyal View Post
you should post in the thread for that plugin, there it is more likely to get attention
Moderator Notice
Merged

BR
BetterRed is online now   Reply With Quote
Old 08-30-2018, 09:34 AM   #268
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 7,546
Karma: 7563069
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O
@arooni: That looks like a genuine bug, will look into it .

@rolgiati: AFAICT, that's from the vanilla Collections handling in the Kindle driver, not this plugin (and that's basically useless and/or very very limited), and it's basically unmaintained, so I can't really tell you much about it.

If that's actually somehow triggered by the plugin, I'm going to have to know what exactly you were attempting to do, because I can't see it from that stacktrace .

Last edited by NiLuJe; 08-30-2018 at 11:02 AM.
NiLuJe is offline   Reply With Quote
Old 08-30-2018, 10:59 AM   #269
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 7,546
Karma: 7563069
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O
Released 1.7.21, which should fix @arooni's issue (you'll need to delete the plugin's on-device cache (kindle_collections_path_cache.calibre at the device's root), though).
NiLuJe is offline   Reply With Quote
Old 08-30-2018, 12:15 PM   #270
rolgiati
Connoisseur
rolgiati knows the complete value of PI to the endrolgiati knows the complete value of PI to the endrolgiati knows the complete value of PI to the endrolgiati knows the complete value of PI to the endrolgiati knows the complete value of PI to the endrolgiati knows the complete value of PI to the endrolgiati knows the complete value of PI to the endrolgiati knows the complete value of PI to the endrolgiati knows the complete value of PI to the endrolgiati knows the complete value of PI to the endrolgiati knows the complete value of PI to the end
 
Posts: 86
Karma: 31214
Join Date: May 2011
Location: Asuncion (Paraguay)
Device: Several Kindle 3 KB's
Quote:
Originally Posted by NiLuJe View Post
If that's actually somehow triggered by the plugin, I'm going to have to know what exactly you were attempting to do, because I can't see it from that stacktrace .
How can I help ?
rolgiati 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
Kindle Collections plugin JosephWebber Plugins 1 08-21-2017 11:44 AM
[GUI Plugin] Kindle Collections (old) meme Plugins 2070 08-11-2014 12:02 AM
KIndle collections Calibre plugin atp Library Management 0 02-21-2012 07:26 PM
[GUI Plugin] WebOS Kindle-Import CranstD Plugins 0 01-24-2012 03:36 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 06:58 AM.


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