-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathsourcerer.py
114 lines (98 loc) · 6.09 KB
/
sourcerer.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# -*- coding: utf-8 -*-
"""
pygments.styles.sourcerer
~~~~~~~~~~~~~~~~~~~~~~~
██████ ██████ ██ ██ ██████ █████ █████ ██████ █████ ██████
██░░░░ ██░░░░██░██ ░██░░██░░████░░░██ ██░░░██░░██░░████░░░██░░██░░██
░░█████ ░██ ░██░██ ░██ ░██ ░░░██ ░░ ░███████ ░██ ░░░███████ ░██ ░░
░░░░░██░██ ░██░██ ░██ ░██ ░██ ██░██░░░░ ░██ ░██░░░░ ░██
██████ ░░██████ ░░██████░███ ░░█████ ░░██████░███ ░░██████░███
░░░░░░ ░░░░░░ ░░░░░░ ░░░ ░░░░░ ░░░░░░ ░░░ ░░░░░░ ░░░
r e a d c o d e l i k e a w i z a r d
sourcerer by xero harrison (http://sourcerer.xero.nu)
├─ based on sorcerer by Jeet Sukumaran (http://jeetworks.org)
└─ based on mustang by Henrique C. Alves ([email protected])
:copyright: none
:license: free
"""
from pygments.style import Style
from pygments.token import Keyword, Name, Comment, String, Error, Text, \
Number, Operator, Generic, Whitespace, Punctuation, Other, Literal
class SourcererStyle(Style):
"""
This style mimics the sourcerer color scheme.
"""
background_color = "#222222"
highlight_color = "#49483e"
styles = {
# No corresponding class for the following:
Text: "#AFAFAF", # class: ''
Whitespace: "", # class: 'w'
Error: "#960050 bg:#1e0010", # class: 'err'
Other: "", # class 'x'
Comment: "#5f5f5f", # class: 'c'
Comment.Multiline: "#5f5f5f", # class: 'cm'
Comment.Preproc: "", # class: 'cp'
Comment.Single: "", # class: 'c1'
Comment.Special: "", # class: 'cs'
Keyword: "#90B0D1", # class: 'k'
Keyword.Constant: "", # class: 'kc'
Keyword.Declaration: "", # class: 'kd'
Keyword.Namespace: "#6688AA", # class: 'kn'
Keyword.Pseudo: "", # class: 'kp'
Keyword.Reserved: "", # class: 'kr'
Keyword.Type: "", # class: 'kt'
Operator: "#D0D0D0", # class: 'o'
Operator.Word: "", # class: 'ow' - like keywords
Punctuation: "#D0D0D0", # class: 'p'
Name: "#AfAfAf", # class: 'n'
Name.Attribute: "#87875f", # class: 'na' - to be revised
Name.Builtin: "", # class: 'nb'
Name.Builtin.Pseudo: "", # class: 'bp'
Name.Class: "#87875f", # class: 'nc' - to be revised
Name.Constant: "#90B0D1", # class: 'no' - to be revised
Name.Decorator: "#87875f", # class: 'nd' - to be revised
Name.Entity: "", # class: 'ni'
Name.Exception: "#87875f", # class: 'ne'
Name.Function: "#87875f", # class: 'nf'
Name.Property: "", # class: 'py'
Name.Label: "", # class: 'nl'
Name.Namespace: "", # class: 'nn' - to be revised
Name.Other: "#87875f", # class: 'nx'
Name.Tag: "#D0D0D0", # class: 'nt' - like a keyword
Name.Variable: "", # class: 'nv' - to be revised
Name.Variable.Class: "", # class: 'vc' - to be revised
Name.Variable.Global: "", # class: 'vg' - to be revised
Name.Variable.Instance: "", # class: 'vi' - to be revised
Number: "#8181A6", # class: 'm'
Number.Float: "", # class: 'mf'
Number.Hex: "", # class: 'mh'
Number.Integer: "", # class: 'mi'
Number.Integer.Long: "", # class: 'il'
Number.Oct: "", # class: 'mo'
Literal: "#8181A6", # class: 'l'
Literal.Date: "#87875f", # class: 'ld'
String: "#87875f", # class: 's'
String.Backtick: "", # class: 'sb'
String.Char: "", # class: 'sc'
String.Doc: "", # class: 'sd' - like a comment
String.Double: "", # class: 's2'
String.Escape: "#8181A6", # class: 'se'
String.Heredoc: "", # class: 'sh'
String.Interpol: "", # class: 'si'
String.Other: "", # class: 'sx'
String.Regex: "", # class: 'sr'
String.Single: "", # class: 's1'
String.Symbol: "", # class: 'ss'
Generic: "", # class: 'g'
Generic.Deleted: "#D0D0D0", # class: 'gd',
Generic.Emph: "", # class: 'ge'
Generic.Error: "", # class: 'gr'
Generic.Heading: "", # class: 'gh'
Generic.Inserted: "#87875f", # class: 'gi'
Generic.Output: "", # class: 'go'
Generic.Prompt: "", # class: 'gp'
Generic.Strong: "", # class: 'gs'
Generic.Subheading: "#FF9800", # class: 'gu'
Generic.Traceback: "", # class: 'gt'
}