![]() |
[Plugin] KindleImport Sigil plugin
1 Attachment(s)
Import Amazon Kindlebooks into Sigil ** NOTE: this plugin periodically checks for updated versions by connecting to github (where the source is maintained). Read the full post for more details ** If you're using Sigil v0.9.0 or later on OSX or Windows, all dependencies should already be met so long as you're using the bundled Python interpreter (default). Linux users will have to make sure that the Tk or PyQt5 graphical python module is present if it's not already. On Debian-based flavors this can be done with "sudo apt-get install python-tk (or python-pyqt5)" for python 2.7 or "sudo apt-get install python3-tk (or python3-pyqt5)" for Python 3.4. On Arch distributions it can be done with pacman -S tk and/or pacman -S python-pyqt5). *Note: Do not rename any Sigil plugin zip files before attempting to install them * This plugin will work with either Python 3.4+ or Python 2.7+ (defaults to 3.x if both are present). The absolute minimum version of Sigil required is v0.8.3 (Python must be installed separately prior to v0.9.0) In addition to being able to unpack/open the KF8 sections of files, it also takes a pretty serious stab at opening the older style mobi-only files (thanks to KevinH for contributions/suggestions on that front). Also, if the original source package is a part of the file (think kindlegen output) and the original source is an epub, then the plugin will open that instead of using the unpacked version. * Please note that there's some atrociously bad markup in many older mobi files (even retail ones), so while the plugin tries its best to whip that markup into some semblance of validity, it's still in your best interest to allow Sigil to correct any issues it may detect upon first opening. * Configurable preferences (available after first run in the plugin's corresponding json prefs file) are: As of v0.80.3
added in v0.80.6
For those who don't know where to find the plugin's json preferences file, the easiest way is to open the Sigil Preferences location from within Sigil. This can be achieved by 'Edit->Preferences' (or F5) and looking for the "Open Preferences Location' button in the bottom-left portion of the Sigil Preferences dialog. After clicking that button, you open the 'plugins_prefs' folder, and then the 'KindleImport' folder. There you should find a file named 'KindleImport.json', which is the one you want. If that file is missing, you probably haven't used the plugin yet. It needs to be run once before the file will be created. KindleImport's code is hosted/maintained on Github. This plugin's update checker will only try to check for updates after at least 12 hours has elapsed since its last check. The plugin will only notify you about updates once for each new version released. Changes Spoiler:
|
Feature request ;):
Epub file not new.epub but BookTitle.epub? |
That's out of the Input plugin developer's hands.
|
1 Attachment(s)
This is for testing and only for DD :).
|
Quote:
|
Hi varlog,
I do think that it is controllable by the plugin. The problem is that you would not want to use the book title as the file name without cleaning up all of the possibly nasty characters, control chars, forward and backward slashes, any character with special meaning in the shell, spaces at the end, etc that can come from a book title used to create a file name. So using "new.epub" is safer and since the file itself is passed into Sigil via temp directories/scratchfiles, the user will need to rename it and save it someplace anyway ... which makes "new.epub" as good a temporary file name as any. KevinH Quote:
|
Quote:
Should be doable. :) |
Quote:
|
I've come across an error trying to import a Mobi eBook from Amazon. I am using Windows 7 32-bit and Python 32-bit (version 2.7.6) from Python.org with the 32-bit Sigil.
Code:
Status: failed |
Quote:
The overkill would be to include the name of the original file :). |
Quote:
By any chance, does that same book fail when trying to unpack using KindleUnpack (plugin or stand-alone)? If so, we may want to take this to the KindleUnpack thread. That's what the KindleImport plugin uses. |
You do realize that you are talking about naming a temporary file that will be needed to have save-as done on it once it makes it to Sigil, right?
Yes, running it through a file cleaning routine is indeed possible and KindleUnpack has one I think. Giving it the same basename as the original file might in fact be easier to do since no file name cleaning routine would be needed at all since a valid base name has to exist. Quote:
|
Hi JSWolf,
please run DumpMobiHeader_v018.py on that mobi and copy what values it has for cover offset and thumbnail offset in the EXTH metadata for the old Mobi header. I am betting that the ThumbOffset is 0xFFFFFFFF which means it's missing. If so I can give you a new mobi_opf.py to fix that issue. DumpMobiHeader is an extra Python script that I have added to the KindleUnpack zip archives on occasion. Any recent version would work. If not, then please post a test case to the KindleUnpack forum and I will try to track it down. KevinH Quote:
|
Quote:
Code:
calibre, version 2.4.0 |
Quote:
Here is the output from DumpMobiHeader from 0.75. Code:
DumpMobiHeader v018 |
| All times are GMT -4. The time now is 06:06 PM. |
Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.