Beispiel #1
0
 def prefs_for_rendering(self):
     prefs = self.current_prefs
     prefs = override_prefs(
         prefs,
         override_style=self.current_style,
         override_color_theme=self.current_colors)
     return prefs
Beispiel #2
0
def write_generated_cover(db, book_id, width, height, destf):
    mi = db.get_metadata(book_id)
    set_use_roman(get_use_roman())
    if height is None:
        prefs = cprefs
    else:
        ratio = height / float(cprefs['cover_height'])
        prefs = override_prefs(cprefs)
        scale_cover(prefs, ratio)
    cdata = generate_cover(mi, prefs=prefs)
    destf.write(cdata)
Beispiel #3
0
def write_generated_cover(db, book_id, width, height, destf):
    mi = db.get_metadata(book_id)
    set_use_roman(get_use_roman())
    if height is None:
        prefs = cprefs
    else:
        ratio = height / float(cprefs['cover_height'])
        prefs = override_prefs(cprefs)
        scale_cover(prefs, ratio)
    cdata = generate_cover(mi, prefs=prefs)
    destf.write(cdata)
Beispiel #4
0
 def prefs_for_rendering(self):
     prefs = self.current_prefs
     prefs = override_prefs(prefs,
                            override_style=self.current_style,
                            override_color_theme=self.current_colors)
     return prefs