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')
|