02-20-2019, 05:56 AM | #106 | |
Grand Sorcerer
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
As a workaround comment out (or delete) the following sections from the code: line 11 Code:
from PIL import Image Code:
#------------------------------ # check minimum cover width #------------------------------ img = None if cover_id and os.path.splitext(bk.id_to_href(cover_id))[1][1:].upper() != 'SVG': imgdata = bk.readfile(cover_id) img = Image.open(BytesIO(imgdata)).convert('L') width, height = img.size if width < 500: plugin_warnings += '\nWarning: The cover is too small: ' + str(width) + ' x ' + str(height) # check recommended dpi if prefs['check_dpi'] == True: xdpi, ydpi = img.info['dpi'] if (int(xdpi) or int(ydpi)) < 300: plugin_warnings += '\nInfo: Amazon recommends 300 dpi cover images. Your image has: ' + str(int(xdpi)) + ' x ' + str(int(ydpi)) + ' dpi.' Code:
#================================================ # generate mobi thumbnail image for eInk kindles #================================================ if img and prefs['thumbnail'] == True: thumbnail_height = prefs['thumbnail_height'] img.thumbnail((thumbnail_height, thumbnail_height), Image.ANTIALIAS) if prefs['add_asin'] == True: img_dest_path = os.path.join(dst_folder, 'thumbnail_' + asin + '_EBOK_portrait.jpg') else: if prefs['kfx'] == True and KFX_ASIN is not None: img_dest_path = os.path.join(dst_folder, 'thumbnail_' + KFX_ASIN + '_EBOK_portrait.jpg') else: img_dest_path = os.path.join(dst_folder, 'thumbnail_EBOK_portrait.jpg') img.save(img_dest_path) if os.path.isfile(img_dest_path): print('\nThumbnail copied to: ' + img_dest_path) else: print('\nPlugin Error: Thumbnail creation failed.') |
|
02-20-2019, 10:24 AM | #107 | |
Guru
Posts: 677
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
|
Quote:
Thanks -- PS however, it does not generate the thumbnail cover. Since the fix was to comment out the code making that image, should have expected that. Last edited by AlanHK; 02-20-2019 at 03:01 PM. |
|
Advert | |
|
02-20-2019, 11:55 AM | #108 |
Grand Sorcerer
Posts: 28,040
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
PIL (Pillow) is still bundled with the legacy version of Sigil 0.9.12. In fact the Kindlegen plugin works just fine for me when the legacy version of Sigil is installed on Windows 7 or Windows 10. I'm not near an XP machine (physical or virtual) to test why it might not be working there, but I suspect it has something to do with the update to the latest version of Pillow. Considering that the highest version of Python I can use on XP (3.4) is deprecated, and that Pillow is dropping support for Python 3.4 very soon (the next version of pip will drop python 3.4 support), my options to make it work might be limited.
|
02-20-2019, 08:20 PM | #109 |
Grand Sorcerer
Posts: 28,040
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
So apparently the Pillow v5.4.1 whl file explicitly created for 32-bit Python3.4 on Windows doesn't actually work for 32-bit Python3.4 on Windows XP (even though Python3.4 is supported on XP). Go figure!
This should be fixed now in the latest legacy build of Sigil (with no workaround necessary). |
04-16-2019, 01:26 PM | #110 |
Enthusiast
Posts: 29
Karma: 10
Join Date: Apr 2019
Device: none
|
Can't create preferences folder in Sigil 0.9.0
I have Windows 10. I installed Sigel 0.9.0 and the Kindlegen plugin from links the in same YouTube video. …….However, when I try to create the preferences folder so I can change the compression by going to Plugins>Output>Kindlegen then click Start…. instead of getting an OK button to click so I can continue (so I can create a preferences file and change the compression number to make a smaller file size) I get the following error message…
Status: failed Traceback (most recent call last): File "site-packages\cssutils\util.py", line 18, in <module> File "site-packages\cssutils\_fetchgae.py", line 7, in <module> ImportError: No module named 'google' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Program Files\Sigil\plugin_launchers\python\launcher.py", line 134, in launch target_script = __import__(script_module) File "C:\Users\bears\AppData\Local\sigil-ebook\sigil\plugins\KindleGen\plugin.py", line 14, in <module> import cssutils File "site-packages\cssutils\__init__.py", line 111, in <module> File "site-packages\cssutils\util.py", line 20, in <module> File "site-packages\cssutils\_fetch.py", line 8, in <module> ImportError: No module named 'encutils' Error: No module named 'encutils' |
Advert | |
|
04-16-2019, 01:39 PM | #111 |
Grand Sorcerer
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
|
Sigil 0.9.0 is outdated, please uninstall it and install the latest version.
The latest version of the KindleGen plugin comes with a GUI and doesn't require any manual preference file edits. You also don't need to create a Preferences folder, because it'll be automatically generated by Sigil. (You can access it by selecting Edit > Preferences > Open Preferences Location.) Last edited by Doitsu; 04-16-2019 at 04:14 PM. |
04-16-2019, 04:03 PM | #112 |
Grand Sorcerer
Posts: 28,040
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
There's a Youtube video about installing the Kindlegen plugin in Sigil?
Holy carp! There's all kinds of Sigil videos on Youtube. |
04-17-2019, 12:12 AM | #113 |
Bibliophagist
Posts: 40,524
Karma: 156983616
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
|
04-17-2019, 04:48 AM | #114 | ||
Enthusiast
Posts: 29
Karma: 10
Join Date: Apr 2019
Device: none
|
Quote:
Thank you Doitsu I installed 0.9.13 but forgot that you said Quote:
Then I try to follow the steps to change the compression number but I cannot see the KINDELGEN.INI Steps: Open Plugins>ManagePlugins>Open Preferences>open Plugins folder>open Kindlegen folder>open Kindlegen.ini with notepad>line 20 Set compressions to 2 The bold bit I cannot do as I don't see Kindlegen.ini Also, when I have missing TOC (whatever that is) and other things but I cannot find how to get the URL of the screen grabs to insert the screen grabs in here. Do I need to update the Kindlegen plugin that I installed when I installed Sigil 0.9.0 or will the same plugin work with 9.0.13? If I have to update it How/where do i find the Kindlegen plugin to go with 0.9.13. I Googled but was left unclear. Last edited by LittleMissS; 04-17-2019 at 05:17 AM. Reason: I had an addition related question |
||
04-17-2019, 06:07 AM | #115 | ||
Enthusiast
Posts: 29
Karma: 10
Join Date: Apr 2019
Device: none
|
Quote:
Thank you Doitsu I installed 0.9.13 but forgot that you said Quote:
Then I try to follow the steps to change the compression number but I cannot see the KINDELGEN.INI Steps: Open Plugins>ManagePlugins>Open Preferences>open Plugins folder>open Kindlegen folder>open Kindlegen.ini with notepad>line 20 Set compressions to 2 The bold bit I cannot do as I don't see Kindlegen.ini Also, when I have missing TOC (whatever that is) and other things but I cannot find how to get the URL of the screen grabs to insert the screen grabs in here. |
||
04-17-2019, 07:17 AM | #116 | |
Grand Sorcerer
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
|
|
04-17-2019, 08:09 AM | #117 | |
Enthusiast
Posts: 29
Karma: 10
Join Date: Apr 2019
Device: none
|
Quote:
1) Would reinstalling Previewer, Kindlegen and Sigil 0.9.13 in the same folder work? Is it even necessary? A friend (who I cannot currently contact for a day or two) installed Kindle Previewer for me after I had Sigil 9.0.9 installed. 2)Will I need a different Kindle Previewer with Sigil 9.0.13? |
|
04-17-2019, 08:22 AM | #118 |
Grand Sorcerer
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
|
1. You'll need to install the following:
a) Sigil 0.9.1.3 b) Amazon Kindle Previewer 3.30. c) The KindleGen plugin (only if haven't already installed it) When asked, accept whatever installation folder the installer suggests. (If Sigil or Kindle Previewer is already installed, the installer will automatically update the existing version.) After the installation, open an epub with Sigil and select Plugins > Output > KindleGen. This'll display a settings dialog box, which you can use to customize settings such as the compression value. (The plugin will remember this value.) Last edited by Doitsu; 04-17-2019 at 08:25 AM. |
04-17-2019, 04:01 PM | #119 |
Enthusiast
Posts: 29
Karma: 10
Join Date: Apr 2019
Device: none
|
No Start button when trying to create Kindle file
I was given a link to post this here but can only see a Reply button. So sorry if wrong to use it.
Using Sigil 0.9.13 I did Table of Contents for both ePub and mobi (at least I think it did it for both). When I then went to make the Kindle file via Plugins>Output>Kindlegen I didn't get the Start button. Instead I saw the words 'Status running' and saw a progressing motion type thing (green). I also got a box come up with 'SRL not found' 'Cover not found' (I've not added a cover {or images} yet I just want to create the kindle file and save at this stage so I can see the size before I add cover and images). I had Status: success Plugin terminated by user. Please click OK to close the Plugin Runner window. As there was no Start button I clicked 'OK'. I am confused about why it says Status: success but I see nothing telling me the file size or anything to let me know the file has been created. |
04-17-2019, 04:23 PM | #120 |
Grand Sorcerer
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
|
Your problem is that the Youtube video that watched referred to software options that no longer exist.
For example, there's no Start button, because the current version of the KindleGen plugin starts automatically. When you run the plugin for the first time simply ignore all the warning messages and don't click the Cancel button. Eventually, you'll see the KindleGen messages that you're expecting to see. |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
epubcheck plugin for Sigil | Doitsu | Plugins | 533 | 10-24-2024 04:32 PM |
[Plugin] PunctuationSmarten Sigil plugin | DiapDealer | Plugins | 138 | 07-11-2023 12:22 PM |
[Plugin] KindleImport Sigil plugin | DiapDealer | Plugins | 187 | 07-04-2022 11:11 AM |
font change sigil to mobi with kindlegen | wyatt650 | Sigil | 4 | 09-05-2013 11:49 AM |
Sigil to Kindlegen -- No Table of Contents | paul-b | Sigil | 70 | 05-03-2012 05:57 PM |