PageRenderTime 13ms CodeModel.GetById 5ms app.highlight 6ms RepoModel.GetById 0ms app.codeStats 0ms

/syntaxhighlight/pygments/styles/pastie.py

http://github.com/plushcms/PlushCMS
Python | 75 lines | 49 code | 11 blank | 15 comment | 0 complexity | 55b46d261c1a10b81889486af3b0e63d MD5 | raw file
 1# -*- coding: utf-8 -*-
 2"""
 3    plushcms.syntaxhighlight.pygments.styles.pastie
 4    ~~~~~~~~~~~~~~~~~~~~~~
 5
 6    Style similar to the `pastie`_ default style.
 7
 8    .. _pastie: http://pastie.caboo.se/
 9
10    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
11    :license: BSD, see LICENSE for details.
12"""
13
14from plushcms.syntaxhighlight.pygments.style import Style
15from plushcms.syntaxhighlight.pygments.token import Keyword, Name, Comment, String, Error, \
16     Number, Operator, Generic, Whitespace
17
18
19class PastieStyle(Style):
20    """
21    Style similar to the pastie default style.
22    """
23
24    default_style = ''
25
26    styles = {
27        Whitespace:             '#bbbbbb',
28        Comment:                '#888888',
29        Comment.Preproc:        'bold #cc0000',
30        Comment.Special:        'bg:#fff0f0 bold #cc0000',
31
32        String:                 'bg:#fff0f0 #dd2200',
33        String.Regex:           'bg:#fff0ff #008800',
34        String.Other:           'bg:#f0fff0 #22bb22',
35        String.Symbol:          '#aa6600',
36        String.Interpol:        '#3333bb',
37        String.Escape:          '#0044dd',
38
39        Operator.Word:          '#008800',
40
41        Keyword:                'bold #008800',
42        Keyword.Pseudo:         'nobold',
43        Keyword.Type:           '#888888',
44
45        Name.Class:             'bold #bb0066',
46        Name.Exception:         'bold #bb0066',
47        Name.Function:          'bold #0066bb',
48        Name.Property:          'bold #336699',
49        Name.Namespace:         'bold #bb0066',
50        Name.Builtin:           '#003388',
51        Name.Variable:          '#336699',
52        Name.Variable.Class:    '#336699',
53        Name.Variable.Instance: '#3333bb',
54        Name.Variable.Global:   '#dd7700',
55        Name.Constant:          'bold #003366',
56        Name.Tag:               'bold #bb0066',
57        Name.Attribute:         '#336699',
58        Name.Decorator:         '#555555',
59        Name.Label:             'italic #336699',
60
61        Number:                 'bold #0000DD',
62
63        Generic.Heading:        '#333',
64        Generic.Subheading:     '#666',
65        Generic.Deleted:        'bg:#ffdddd #000000',
66        Generic.Inserted:       'bg:#ddffdd #000000',
67        Generic.Error:          '#aa0000',
68        Generic.Emph:           'italic',
69        Generic.Strong:         'bold',
70        Generic.Prompt:         '#555555',
71        Generic.Output:         '#888888',
72        Generic.Traceback:      '#aa0000',
73
74        Error:                  'bg:#e3d2d2 #a61717'
75    }