View Single Post
Old 06-22-2023, 03:14 PM   #3
xav
Member
xav began at the beginning.
 
Posts: 22
Karma: 10
Join Date: Mar 2014
Device: Kindle paperwhite 2
I tried to add the options under the existing lines from line 195, as follows, but it did not work (I'm not a developer so I only have some basics about coding and I'm a bit lost in the recipe's classes):

def __init__(self, *args, **kwargs):
BasicNewsRecipe.__init__(self, *args, **kwargs)
if self.output_profile.short_name.startswith('kindle' ):
# Reduce image sizes to get file size below amazon's email
# sending threshold
self.web2disk_options.compress_news_images = True
# Code modifié Xav: 2 au lieu de 5
self.web2disk_options.compress_news_images_auto_si ze = 2
# Code modifié Xav ajout de la ligne ci-dessous pour que les images ne dépassent pas 50kb
self.web2disk_options.compress_news_images_max_siz e = 50
self.log.warn('Kindle Output profile being used, reducing image quality to keep file size below amazon email threshold')
xav is offline   Reply With Quote