Пример #1
0
 def commit(cls):
     cls.set_output_profile()
     cls.set_output_format()
     if cls.supports_color:
         from calibre.ebooks.conversion.config import load_defaults, save_defaults
         recs = load_defaults('comic_input')
         recs['dont_grayscale'] = True
         save_defaults('comic_input', recs)
Пример #2
0
 def commit(cls):
     cls.set_output_profile()
     cls.set_output_format()
     if cls.supports_color:
         from calibre.ebooks.conversion.config import load_defaults, save_defaults
         recs = load_defaults('comic_input')
         recs['dont_grayscale'] = True
         save_defaults('comic_input', recs)
Пример #3
0
 def set_image_settings(cls):
     from calibre.ebooks.conversion.config import load_defaults, save_defaults
     recs = load_defaults('comic_input')
     
     output_profile = "No output profile found."
     for profile in output_profiles():
         if profile.short_name == cls.output_profile:
             output_profile = profile
     
     if getattr(output_profile, 'colors', 0): # Can also refer to grayscale shades
         recs['colors'] = getattr(output_profile, 'colors')
     
     if getattr(output_profile, 'supports_color', False):
         recs['dont_grayscale'] = True
     
     if getattr(output_profile, 'large_screen', False):
         recs['keep_aspect_ratio'] = True
     
     save_defaults('comic_input', recs)
Пример #4
0
 def set_output_profile(cls):
     if cls.output_profile:
         from calibre.ebooks.conversion.config import load_defaults, save_defaults
         recs = load_defaults('page_setup')
         recs['output_profile'] = cls.output_profile
         save_defaults('page_setup', recs)
Пример #5
0
 def set_output_profile(cls):
     if cls.output_profile:
         from calibre.ebooks.conversion.config import load_defaults, save_defaults
         recs = load_defaults('page_setup')
         recs['output_profile'] = cls.output_profile
         save_defaults('page_setup', recs)