-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kindle Scribe Cover generation after mtp firmware #508
Comments
This looks absolutely fantastic! I wonder if it's feasible? |
@pretenderlu what's not feasible? The workaround works but I'm not sure if it's possible to automate like before. If anything this is more convenient since kindle doesn't need to be plugged in. |
Yes, what I mean is I don't know if it can be fully automated. If full automation is possible, that would be perfect. |
@pretenderlu May be possible with a python library that supports MTP. the biggest issue is that Mac and Linux prevent more than one MTP connection, so Android File Transfer running will interfere. Android File Transfer is required on Mac to transfer the mobis and auto starts when kindle is plugged in. |
@axu2 Indeed, it seems inevitable that human intervention is needed. However, the ability to directly generate corresponding comics and covers is already great, and manually operating one step is also very convenient. |
It's a lot of effort, to be honest. |
It is fully automatable, in theory. But there is effectively no Python library for MTP. For example, this one doesn't work on Python 3, and has not been updated in over 12 years: https://pypi.org/project/PyMTP/ The closest thing to a Python MTP library is what calibre has, but it would need refactoring to use outside of calibre. Ideally, that is what KCC would use. Another option would be to call command line tools from Python. On Windows, you can use Powershell commands to automate Windows Explorer (e.g. [https://github.com/nosalan/powershell-mtp-file-transfer]). On macOS (and maybe Linux), installing libmtp (e.g. 'brew install libmtp') provides a set of command line tools, like mtp-folders, mtp-sendfile, mtp-getfile, etc. |
Well... I wouldn't mind seeing KCC being implemented into Calibre as a plugin since we are on the topic. |
KCC calls lots of command lines tools like kindlegen, 7z, etc. it wouldn't be unusual to do mtp as well. |
I think I have got it working! It is just one Python file (pymtp.py), and after running 2to3 and changing 2 other lines of code that for some reason were calling dunder methods (probably something to do with an older MTP library), I'm able to run example code (also updated with 2to3). I think one can just add the migrated pymtp.py to a project, and as long as the MTP C library is installed on system, it will just work without needing to pip install anything. |
@tomsem @jaroslawjanas @pretenderlu |
Would be nice to have option to manually upload covers after the fact for longer batch conversions without needing kindle plugged in.
Additionally, Kindle Scribe uses MTP so cover upload no longer works.
https://www.mobileread.com/forums/showthread.php?t=355924&highlight=mtp
Hacky workaround
TLDR use kcc normally with a special flash drive inserted.
system/thumbnails
anddocuments
folders at root of flash drive. Based on https://github.com/ciromattia/kcc/blob/master/kindlecomicconverter/kindle.py#L42To create a fake physical flash drive, refer to https://support.apple.com/guide/disk-utility/create-a-disk-image-dskutl11888/mac
and use msdos format.
On Windows
https://learn.microsoft.com/en-us/windows-server/storage/disk-management/manage-virtual-hard-disks
use FAT not FAT32. 100 mb should be good, default on mac.
The text was updated successfully, but these errors were encountered: