View Single Post
Old 02-01-2010, 06:56 AM   #1
GRiker
Comparer of the Ephemeris
GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.
 
Posts: 1,496
Karma: 424697
Join Date: Mar 2009
Device: iPad
New Recipe features supporting Kindle masthead images

0.6.37 introduces the ability for recipes to specify a masthead image to be used when generating a periodical for the Kindle.

The masthead image is displayed in three locations on the Kindle:
  • From the Home page, toggling right while the periodical is highlighted
  • At the top of the Section List
  • At the top of the first article in the first section

You have two options for generating a masthead image:
  • Add a 'masthead_url' property to your recipe, pointing to an online image resource to use as the masthead:
    Code:
        masthead_url = 'http://graphics8.nytimes.com/images/misc/nytlogo379x64.gif'
    To identify a suitable masthead image, go to the site your recipe downloads from and look for a logo with proportions approximately 6:1, e.g., 600 wide x 100 tall. The exact dimensions are not critical, only the proportions. You may need to experiment to find one you like. Tested formats include GIF, JPG, BMP, and PNG.
  • Add a get_masthead_title() method, specifying a text string to be rendered as the masthead image:
    Code:
        def get_masthead_title(self):
            return 'My Custom Masthead Title'
    If 'masthead_url' is not defined in your recipe, or it fails to load, then the BasicNewsRecipe() will render the text returned by get_masthead_title() as the masthead. If you don't have this method in your recipe, the friendly name of the recipe will be used.

By default, existing recipes will use their name property as the text for the customized masthead.

G
GRiker is offline   Reply With Quote