home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2011 January / maximum-cd-2011-01.iso / DiscContents / calibre-0.7.26.msi / file_712 (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2010-10-31  |  23.6 KB  |  700 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. from __future__ import with_statement
  5. __license__ = 'GPL 3'
  6. __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
  7. __docformat__ = 'restructuredtext en'
  8. import sys
  9. from itertools import izip
  10. from xml.sax.saxutils import escape
  11. from calibre.customize import Plugin as _Plugin
  12. FONT_SIZES = [
  13.     ('xx-small', 1),
  14.     ('x-small', None),
  15.     ('small', 2),
  16.     ('medium', 3),
  17.     ('large', 4),
  18.     ('x-large', 5),
  19.     ('xx-large', 6),
  20.     (None, 7)]
  21.  
  22. class Plugin(_Plugin):
  23.     fbase = 12
  24.     fsizes = [
  25.         5,
  26.         7,
  27.         9,
  28.         12,
  29.         13.5,
  30.         17,
  31.         20,
  32.         22,
  33.         24]
  34.     screen_size = (1600, 1200)
  35.     dpi = 100
  36.     
  37.     def __init__(self, *args, **kwargs):
  38.         _Plugin.__init__(self, *args, **kwargs)
  39.         (self.width, self.height) = self.screen_size
  40.         fsizes = list(self.fsizes)
  41.         self.fkey = list(self.fsizes)
  42.         self.fsizes = []
  43.         for name, num in izip(FONT_SIZES, fsizes):
  44.             size = None
  45.             self.fsizes.append((name, num, float(size)))
  46.         
  47.         self.fnames = dict((lambda .0: for name, _, sz in .0:
  48. if name:
  49. (name, sz)continue)(self.fsizes))
  50.         self.fnums = dict((lambda .0: for _, num, sz in .0:
  51. if num:
  52. (num, sz)continue)(self.fsizes))
  53.  
  54.  
  55.  
  56. class InputProfile(Plugin):
  57.     author = 'Kovid Goyal'
  58.     supported_platforms = set([
  59.         'windows',
  60.         'osx',
  61.         'linux'])
  62.     can_be_disabled = False
  63.     type = _('Input profile')
  64.     name = 'Default Input Profile'
  65.     short_name = 'default'
  66.     description = _('This profile tries to provide sane defaults and is useful if you know nothing about the input document.')
  67.  
  68.  
  69. class SonyReaderInput(InputProfile):
  70.     name = 'Sony Reader'
  71.     short_name = 'sony'
  72.     description = _('This profile is intended for the SONY PRS line. The 500/505/600/700 etc.')
  73.     screen_size = (584, 754)
  74.     dpi = 168.451
  75.     fbase = 12
  76.     fsizes = [
  77.         7.5,
  78.         9,
  79.         10,
  80.         12,
  81.         15.5,
  82.         20,
  83.         22,
  84.         24]
  85.  
  86.  
  87. class SonyReader300Input(SonyReaderInput):
  88.     name = 'Sony Reader 300'
  89.     short_name = 'sony300'
  90.     description = _('This profile is intended for the SONY PRS 300.')
  91.     dpi = 200
  92.  
  93.  
  94. class SonyReader900Input(SonyReaderInput):
  95.     author = 'John Schember'
  96.     name = 'Sony Reader 900'
  97.     short_name = 'sony900'
  98.     description = _('This profile is intended for the SONY PRS-900.')
  99.     screen_size = (584, 978)
  100.  
  101.  
  102. class MSReaderInput(InputProfile):
  103.     name = 'Microsoft Reader'
  104.     short_name = 'msreader'
  105.     description = _('This profile is intended for the Microsoft Reader.')
  106.     screen_size = (480, 652)
  107.     dpi = 96
  108.     fbase = 13
  109.     fsizes = [
  110.         10,
  111.         11,
  112.         13,
  113.         16,
  114.         18,
  115.         20,
  116.         22,
  117.         26]
  118.  
  119.  
  120. class MobipocketInput(InputProfile):
  121.     name = 'Mobipocket Books'
  122.     short_name = 'mobipocket'
  123.     description = _('This profile is intended for the Mobipocket books.')
  124.     screen_size = (600, 800)
  125.     dpi = 96
  126.     fbase = 18
  127.     fsizes = [
  128.         14,
  129.         14,
  130.         16,
  131.         18,
  132.         20,
  133.         22,
  134.         24,
  135.         26]
  136.  
  137.  
  138. class HanlinV3Input(InputProfile):
  139.     name = 'Hanlin V3'
  140.     short_name = 'hanlinv3'
  141.     description = _('This profile is intended for the Hanlin V3 and its clones.')
  142.     screen_size = (584, 754)
  143.     dpi = 168.451
  144.     fbase = 16
  145.     fsizes = [
  146.         12,
  147.         12,
  148.         14,
  149.         16,
  150.         18,
  151.         20,
  152.         22,
  153.         24]
  154.  
  155.  
  156. class HanlinV5Input(HanlinV3Input):
  157.     name = 'Hanlin V5'
  158.     short_name = 'hanlinv5'
  159.     description = _('This profile is intended for the Hanlin V5 and its clones.')
  160.     screen_size = (584, 754)
  161.     dpi = 200
  162.  
  163.  
  164. class CybookG3Input(InputProfile):
  165.     name = 'Cybook G3'
  166.     short_name = 'cybookg3'
  167.     description = _('This profile is intended for the Cybook G3.')
  168.     screen_size = (600, 800)
  169.     dpi = 168.451
  170.     fbase = 16
  171.     fsizes = [
  172.         12,
  173.         12,
  174.         14,
  175.         16,
  176.         18,
  177.         20,
  178.         22,
  179.         24]
  180.  
  181.  
  182. class CybookOpusInput(InputProfile):
  183.     author = 'John Schember'
  184.     name = 'Cybook Opus'
  185.     short_name = 'cybook_opus'
  186.     description = _('This profile is intended for the Cybook Opus.')
  187.     screen_size = (600, 800)
  188.     dpi = 200
  189.     fbase = 16
  190.     fsizes = [
  191.         12,
  192.         12,
  193.         14,
  194.         16,
  195.         18,
  196.         20,
  197.         22,
  198.         24]
  199.  
  200.  
  201. class KindleInput(InputProfile):
  202.     name = 'Kindle'
  203.     short_name = 'kindle'
  204.     description = _('This profile is intended for the Amazon Kindle.')
  205.     screen_size = (525, 640)
  206.     dpi = 168.451
  207.     fbase = 16
  208.     fsizes = [
  209.         12,
  210.         12,
  211.         14,
  212.         16,
  213.         18,
  214.         20,
  215.         22,
  216.         24]
  217.  
  218.  
  219. class IlliadInput(InputProfile):
  220.     name = 'Illiad'
  221.     short_name = 'illiad'
  222.     description = _('This profile is intended for the Irex Illiad.')
  223.     screen_size = (760, 925)
  224.     dpi = 160
  225.     fbase = 12
  226.     fsizes = [
  227.         7.5,
  228.         9,
  229.         10,
  230.         12,
  231.         15.5,
  232.         20,
  233.         22,
  234.         24]
  235.  
  236.  
  237. class IRexDR1000Input(InputProfile):
  238.     author = 'John Schember'
  239.     name = 'IRex Digital Reader 1000'
  240.     short_name = 'irexdr1000'
  241.     description = _('This profile is intended for the IRex Digital Reader 1000.')
  242.     screen_size = (1024, 1280)
  243.     dpi = 160
  244.     fbase = 16
  245.     fsizes = [
  246.         12,
  247.         14,
  248.         16,
  249.         18,
  250.         20,
  251.         22,
  252.         24]
  253.  
  254.  
  255. class IRexDR800Input(InputProfile):
  256.     author = 'Eric Cronin'
  257.     name = 'IRex Digital Reader 800'
  258.     short_name = 'irexdr800'
  259.     description = _('This profile is intended for the IRex Digital Reader 800.')
  260.     screen_size = (768, 1024)
  261.     dpi = 160
  262.     fbase = 16
  263.     fsizes = [
  264.         12,
  265.         14,
  266.         16,
  267.         18,
  268.         20,
  269.         22,
  270.         24]
  271.  
  272.  
  273. class NookInput(InputProfile):
  274.     author = 'John Schember'
  275.     name = 'Nook'
  276.     short_name = 'nook'
  277.     description = _('This profile is intended for the B&N Nook.')
  278.     screen_size = (600, 800)
  279.     dpi = 167
  280.     fbase = 16
  281.     fsizes = [
  282.         12,
  283.         12,
  284.         14,
  285.         16,
  286.         18,
  287.         20,
  288.         22,
  289.         24]
  290.  
  291. input_profiles = [
  292.     InputProfile,
  293.     SonyReaderInput,
  294.     SonyReader300Input,
  295.     SonyReader900Input,
  296.     MSReaderInput,
  297.     MobipocketInput,
  298.     HanlinV3Input,
  299.     HanlinV5Input,
  300.     CybookG3Input,
  301.     CybookOpusInput,
  302.     KindleInput,
  303.     IlliadInput,
  304.     IRexDR1000Input,
  305.     IRexDR800Input,
  306.     NookInput]
  307. input_profiles.sort(cmp = (lambda x, y: cmp(x.name.lower(), y.name.lower())))
  308.  
  309. class OutputProfile(Plugin):
  310.     author = 'Kovid Goyal'
  311.     supported_platforms = set([
  312.         'windows',
  313.         'osx',
  314.         'linux'])
  315.     can_be_disabled = False
  316.     type = _('Output profile')
  317.     name = 'Default Output Profile'
  318.     short_name = 'default'
  319.     description = _('This profile tries to provide sane defaults and is useful if you want to produce a document intended to be read at a computer or on a range of devices.')
  320.     comic_screen_size = (584, 754)
  321.     supports_mobi_indexing = False
  322.     touchscreen = False
  323.     touchscreen_news_css = ''
  324.     extra_css_modules = []
  325.     periodical_date_in_title = True
  326.     ratings_char = u'*'
  327.     unsupported_unicode_chars = []
  328.     mobi_ems_per_blockquote = 1
  329.     epub_periodical_format = None
  330.     
  331.     def tags_to_string(cls, tags):
  332.         return escape(', '.join(tags))
  333.  
  334.     tags_to_string = classmethod(tags_to_string)
  335.  
  336.  
  337. class iPadOutput(OutputProfile):
  338.     name = 'iPad'
  339.     short_name = 'ipad'
  340.     description = _('Intended for the iPad and similar devices with a resolution of 768x1024')
  341.     screen_size = (768, 1024)
  342.     comic_screen_size = (768, 1024)
  343.     dpi = 132
  344.     extra_css_modules = [
  345.         {
  346.             'name': 'webkit',
  347.             'props': {
  348.                 '-webkit-border-bottom-left-radius': '{length}',
  349.                 '-webkit-border-bottom-right-radius': '{length}',
  350.                 '-webkit-border-top-left-radius': '{length}',
  351.                 '-webkit-border-top-right-radius': '{length}',
  352.                 '-webkit-border-radius': '{border-width}(\\s+{border-width}){0,3}|inherit' },
  353.             'macros': {
  354.                 'border-width': '{length}|medium|thick|thin' } }]
  355.     ratings_char = u'Γÿà'
  356.     touchscreen = True
  357.     touchscreen_news_css = u'\n\t\t\t/* hr used in articles */\n\t\t\t.article_articles_list {\n                width:18%;\n\t\t\t\t}\n            .article_link {\n            \tcolor: #593f29;\n                font-style: italic;\n                }\n            .article_next {\n\t\t\t\t-webkit-border-top-right-radius:4px;\n\t\t\t\t-webkit-border-bottom-right-radius:4px;\n                font-style: italic;\n                width:32%;\n                }\n\n            .article_prev {\n\t\t\t\t-webkit-border-top-left-radius:4px;\n\t\t\t\t-webkit-border-bottom-left-radius:4px;\n                font-style: italic;\n                width:32%;\n                }\n\t\t\t.article_sections_list {\n                width:18%;\n\t\t\t\t}\n            .articles_link {\n                font-weight: bold;\n                }\n            .sections_link {\n                font-weight: bold;\n                }\n\n\n            .caption_divider {\n            \tborder:#ccc 1px solid;\n\t\t\t\t}\n\n            .touchscreen_navbar {\n                background:#c3bab2;\n                border:#ccc 0px solid;\n                border-collapse:separate;\n                border-spacing:1px;\n                margin-left: 5%;\n                margin-right: 5%;\n                width: 90%;\n                -webkit-border-radius:4px;\n                }\n            .touchscreen_navbar td {\n                background:#fff;\n                font-family:Helvetica;\n                font-size:80%;\n                /* UI touchboxes use 8px padding */\n                padding: 6px;\n                text-align:center;\n                }\n\n\t\t\t.touchscreen_navbar td a:link {\n\t\t\t\tcolor: #593f29;\n\t\t\t\ttext-decoration: none;\n\t\t\t\t}\n\n\t\t\t/* Index formatting */\n\t\t\t.publish_date {\n\t\t\t\ttext-align:center;\n\t\t\t\t}\n\t\t\t.divider {\n\t\t\t\tborder-bottom:1em solid white;\n\t\t\t\tborder-top:1px solid gray;\n\t\t\t\t}\n\n\t\t\thr.caption_divider {\n\t\t\t\tborder-color:black;\n\t\t\t\tborder-style:solid;\n\t\t\t\tborder-width:1px;\n\t\t\t\t}\n\n            /* Feed summary formatting */\n            .article_summary {\n            \tdisplay:inline-block;\n            \t}\n            .feed {\n                font-family:sans-serif;\n                font-weight:bold;\n                font-size:larger;\n\t\t\t\t}\n\n            .feed_link {\n                font-style: italic;\n                }\n\n            .feed_next {\n\t\t\t\t-webkit-border-top-right-radius:4px;\n\t\t\t\t-webkit-border-bottom-right-radius:4px;\n                font-style: italic;\n                width:40%;\n                }\n\n            .feed_prev {\n\t\t\t\t-webkit-border-top-left-radius:4px;\n\t\t\t\t-webkit-border-bottom-left-radius:4px;\n                font-style: italic;\n                width:40%;\n                }\n\n            .feed_title {\n                text-align: center;\n                font-size: 160%;\n                }\n\n\t\t\t.feed_up {\n                font-weight: bold;\n                width:20%;\n\t\t\t\t}\n\n            .summary_headline {\n                font-weight:bold;\n                text-align:left;\n\t\t\t\t}\n\n            .summary_byline {\n                text-align:left;\n                font-family:monospace;\n\t\t\t\t}\n\n            .summary_text {\n                text-align:left;\n\t\t\t\t}\n\n        '
  358.  
  359.  
  360. class TabletOutput(iPadOutput):
  361.     name = 'Tablet'
  362.     short_name = 'tablet'
  363.     description = _('Intended for generic tablet devices, does no resizing of images')
  364.     screen_size = (sys.maxint, sys.maxint)
  365.     comic_screen_size = (sys.maxint, sys.maxint)
  366.  
  367.  
  368. class SonyReaderOutput(OutputProfile):
  369.     name = 'Sony Reader'
  370.     short_name = 'sony'
  371.     description = _('This profile is intended for the SONY PRS line. The 500/505/600/700 etc.')
  372.     screen_size = (590, 775)
  373.     dpi = 168.451
  374.     fbase = 12
  375.     fsizes = [
  376.         7.5,
  377.         9,
  378.         10,
  379.         12,
  380.         15.5,
  381.         20,
  382.         22,
  383.         24]
  384.     unsupported_unicode_chars = [
  385.         u'Γǃ',
  386.         u'ΓÇ¢']
  387.     epub_periodical_format = 'sony'
  388.  
  389.  
  390. class KoboReaderOutput(OutputProfile):
  391.     name = 'Kobo Reader'
  392.     short_name = 'kobo'
  393.     description = _('This profile is intended for the Kobo Reader.')
  394.     screen_size = (540, 718)
  395.     comic_screen_size = (540, 718)
  396.     dpi = 168.451
  397.     fbase = 12
  398.     fsizes = [
  399.         7.5,
  400.         9,
  401.         10,
  402.         12,
  403.         15.5,
  404.         20,
  405.         22,
  406.         24]
  407.  
  408.  
  409. class SonyReader300Output(SonyReaderOutput):
  410.     author = 'John Schember'
  411.     name = 'Sony Reader 300'
  412.     short_name = 'sony300'
  413.     description = _('This profile is intended for the SONY PRS-300.')
  414.     dpi = 200
  415.  
  416.  
  417. class SonyReader900Output(SonyReaderOutput):
  418.     author = 'John Schember'
  419.     name = 'Sony Reader 900'
  420.     short_name = 'sony900'
  421.     description = _('This profile is intended for the SONY PRS-900.')
  422.     screen_size = (600, 999)
  423.     comic_screen_size = screen_size
  424.  
  425.  
  426. class JetBook5Output(OutputProfile):
  427.     name = 'JetBook 5-inch'
  428.     short_name = 'jetbook5'
  429.     description = _('This profile is intended for the 5-inch JetBook.')
  430.     screen_size = (480, 640)
  431.     dpi = 168.451
  432.  
  433.  
  434. class SonyReaderLandscapeOutput(SonyReaderOutput):
  435.     name = 'Sony Reader Landscape'
  436.     short_name = 'sony-landscape'
  437.     description = _('This profile is intended for the SONY PRS line. The 500/505/700 etc, in landscape mode. Mainly useful for comics.')
  438.     screen_size = (784, 1012)
  439.     comic_screen_size = (784, 1012)
  440.  
  441.  
  442. class MSReaderOutput(OutputProfile):
  443.     name = 'Microsoft Reader'
  444.     short_name = 'msreader'
  445.     description = _('This profile is intended for the Microsoft Reader.')
  446.     screen_size = (480, 652)
  447.     dpi = 96
  448.     fbase = 13
  449.     fsizes = [
  450.         10,
  451.         11,
  452.         13,
  453.         16,
  454.         18,
  455.         20,
  456.         22,
  457.         26]
  458.  
  459.  
  460. class MobipocketOutput(OutputProfile):
  461.     name = 'Mobipocket Books'
  462.     short_name = 'mobipocket'
  463.     description = _('This profile is intended for the Mobipocket books.')
  464.     screen_size = (600, 800)
  465.     dpi = 96
  466.     fbase = 18
  467.     fsizes = [
  468.         14,
  469.         14,
  470.         16,
  471.         18,
  472.         20,
  473.         22,
  474.         24,
  475.         26]
  476.  
  477.  
  478. class HanlinV3Output(OutputProfile):
  479.     name = 'Hanlin V3'
  480.     short_name = 'hanlinv3'
  481.     description = _('This profile is intended for the Hanlin V3 and its clones.')
  482.     screen_size = (584, 754)
  483.     dpi = 168.451
  484.     fbase = 16
  485.     fsizes = [
  486.         12,
  487.         12,
  488.         14,
  489.         16,
  490.         18,
  491.         20,
  492.         22,
  493.         24]
  494.  
  495.  
  496. class HanlinV5Output(HanlinV3Output):
  497.     name = 'Hanlin V5'
  498.     short_name = 'hanlinv5'
  499.     description = _('This profile is intended for the Hanlin V5 and its clones.')
  500.     dpi = 200
  501.  
  502.  
  503. class CybookG3Output(OutputProfile):
  504.     name = 'Cybook G3'
  505.     short_name = 'cybookg3'
  506.     description = _('This profile is intended for the Cybook G3.')
  507.     screen_size = (600, 800)
  508.     dpi = 168.451
  509.     fbase = 16
  510.     fsizes = [
  511.         12,
  512.         12,
  513.         14,
  514.         16,
  515.         18,
  516.         20,
  517.         22,
  518.         24]
  519.  
  520.  
  521. class CybookOpusOutput(SonyReaderOutput):
  522.     author = 'John Schember'
  523.     name = 'Cybook Opus'
  524.     short_name = 'cybook_opus'
  525.     description = _('This profile is intended for the Cybook Opus.')
  526.     dpi = 200
  527.     fbase = 16
  528.     fsizes = [
  529.         12,
  530.         12,
  531.         14,
  532.         16,
  533.         18,
  534.         20,
  535.         22,
  536.         24]
  537.     epub_periodical_format = None
  538.  
  539.  
  540. class KindleOutput(OutputProfile):
  541.     name = 'Kindle'
  542.     short_name = 'kindle'
  543.     description = _('This profile is intended for the Amazon Kindle.')
  544.     screen_size = (525, 640)
  545.     dpi = 168.451
  546.     fbase = 16
  547.     fsizes = [
  548.         12,
  549.         12,
  550.         14,
  551.         16,
  552.         18,
  553.         20,
  554.         22,
  555.         24]
  556.     supports_mobi_indexing = True
  557.     periodical_date_in_title = False
  558.     ratings_char = u'Γÿà'
  559.     mobi_ems_per_blockquote = 2
  560.     
  561.     def tags_to_string(cls, tags):
  562.         return u'%s <br/><span style="color:white">%s</span>' % (', '.join(tags), 'ttt '.join(tags) + 'ttt ')
  563.  
  564.     tags_to_string = classmethod(tags_to_string)
  565.  
  566.  
  567. class KindleDXOutput(OutputProfile):
  568.     name = 'Kindle DX'
  569.     short_name = 'kindle_dx'
  570.     description = _('This profile is intended for the Amazon Kindle DX.')
  571.     screen_size = (744, 1022)
  572.     dpi = 150
  573.     comic_screen_size = (771, 1116)
  574.     supports_mobi_indexing = True
  575.     periodical_date_in_title = False
  576.     mobi_ems_per_blockquote = 2
  577.     
  578.     def tags_to_string(cls, tags):
  579.         return u'%s <br/><span style="color: white">%s</span>' % (', '.join(tags), 'ttt '.join(tags) + 'ttt ')
  580.  
  581.     tags_to_string = classmethod(tags_to_string)
  582.  
  583.  
  584. class IlliadOutput(OutputProfile):
  585.     name = 'Illiad'
  586.     short_name = 'illiad'
  587.     description = _('This profile is intended for the Irex Illiad.')
  588.     screen_size = (760, 925)
  589.     comic_screen_size = (760, 925)
  590.     dpi = 160
  591.     fbase = 12
  592.     fsizes = [
  593.         7.5,
  594.         9,
  595.         10,
  596.         12,
  597.         15.5,
  598.         20,
  599.         22,
  600.         24]
  601.  
  602.  
  603. class IRexDR1000Output(OutputProfile):
  604.     author = 'John Schember'
  605.     name = 'IRex Digital Reader 1000'
  606.     short_name = 'irexdr1000'
  607.     description = _('This profile is intended for the IRex Digital Reader 1000.')
  608.     screen_size = (1024, 1280)
  609.     comic_screen_size = (996, 1241)
  610.     dpi = 160
  611.     fbase = 16
  612.     fsizes = [
  613.         12,
  614.         14,
  615.         16,
  616.         18,
  617.         20,
  618.         22,
  619.         24]
  620.  
  621.  
  622. class IRexDR800Output(OutputProfile):
  623.     author = 'Eric Cronin'
  624.     name = 'IRex Digital Reader 800'
  625.     short_name = 'irexdr800'
  626.     description = _('This profile is intended for the IRex Digital Reader 800.')
  627.     screen_size = (768, 1024)
  628.     comic_screen_size = (768, 1024)
  629.     dpi = 160
  630.     fbase = 16
  631.     fsizes = [
  632.         12,
  633.         14,
  634.         16,
  635.         18,
  636.         20,
  637.         22,
  638.         24]
  639.  
  640.  
  641. class NookOutput(OutputProfile):
  642.     author = 'John Schember'
  643.     name = 'Nook'
  644.     short_name = 'nook'
  645.     description = _('This profile is intended for the B&N Nook.')
  646.     screen_size = (600, 730)
  647.     comic_screen_size = (584, 730)
  648.     dpi = 167
  649.     fbase = 16
  650.     fsizes = [
  651.         12,
  652.         12,
  653.         14,
  654.         16,
  655.         18,
  656.         20,
  657.         22,
  658.         24]
  659.  
  660.  
  661. class BambookOutput(OutputProfile):
  662.     author = 'Li Fanxi'
  663.     name = 'Sanda Bambook'
  664.     short_name = 'bambook'
  665.     description = _('This profile is intended for the Sanda Bambook.')
  666.     screen_size = (600, 800)
  667.     comic_screen_size = (540, 700)
  668.     dpi = 168.451
  669.     fbase = 12
  670.     fsizes = [
  671.         10,
  672.         12,
  673.         14,
  674.         16]
  675.  
  676. output_profiles = [
  677.     OutputProfile,
  678.     SonyReaderOutput,
  679.     SonyReader300Output,
  680.     SonyReader900Output,
  681.     MSReaderOutput,
  682.     MobipocketOutput,
  683.     HanlinV3Output,
  684.     HanlinV5Output,
  685.     CybookG3Output,
  686.     CybookOpusOutput,
  687.     KindleOutput,
  688.     iPadOutput,
  689.     KoboReaderOutput,
  690.     TabletOutput,
  691.     SonyReaderLandscapeOutput,
  692.     KindleDXOutput,
  693.     IlliadOutput,
  694.     IRexDR1000Output,
  695.     IRexDR800Output,
  696.     JetBook5Output,
  697.     NookOutput,
  698.     BambookOutput]
  699. output_profiles.sort(cmp = (lambda x, y: cmp(x.name.lower(), y.name.lower())))
  700.