forked from openstenoproject/plover
-
Notifications
You must be signed in to change notification settings - Fork 0
/
conf.py
100 lines (76 loc) · 2.61 KB
/
conf.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
# Configuration file for the Sphinx documentation builder.
# -- Project information -----------------------------------------------------
project = "Plover"
copyright = "Open Steno Project"
author = copyright
release = "4.0.0-rc2"
version = release
# -- General configuration ---------------------------------------------------
extensions = [
"sphinx_plover",
"myst_parser",
"sphinx.ext.todo",
]
myst_enable_extensions = ["colon_fence"]
templates_path = ["_templates"]
exclude_patterns = []
pygments_style = "manni"
pygments_dark_style = "monokai"
source_suffix = [".rst", ".md"]
todo_include_todos = True
# -- Options for HTML output -------------------------------------------------
html_theme = "furo"
html_static_path = ["_static"]
html_title = f"{project} {version}"
html_favicon = "_static/favicon.ico"
html_css_files = [
"custom.css",
]
html_theme_options = {
"navigation_with_keys": True,
"light_css_variables": {
"color-brand-primary": "#3d6961",
"color-brand-content": "#3d6961",
"color-sidebar-background": "#3d6961",
"color-sidebar-brand-text": "white",
"color-sidebar-brand-text--hover": "white",
"color-sidebar-caption-text": "white",
"color-sidebar-link-text": "white",
"color-sidebar-link-text--top-level": "white",
"color-sidebar-item-background--hover": "#71a89f",
"color-sidebar-item-expander-background--hover": "#71a89f",
"color-inline-code-background": "transparent",
"font-stack--header": "'Patua One', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'",
"font-stack--monospace": "'JetBrains Mono', SFMono-Regular, Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace",
},
"dark_css_variables": {
"color-link": "#68a69b",
"color-link--hover": "#68a69b",
},
"light_logo": "dolores.svg",
"dark_logo": "dolores.svg",
}
from pygments.lexer import RegexLexer, bygroups
from pygments import token as t
from sphinx.highlighting import lexers
class RTFLexer(RegexLexer):
name = "rtf"
tokens = {
"root": [
(r"(\\[a-z*\\_~\{\}]+)(-?\d+)?", bygroups(t.Keyword, t.Number.Integer)),
(r"{\\\*\\cxcomment\s+", t.Comment.Multiline, "comment"),
(
r"({)(\\\*\\cxs)(\s+)([A-Z#0-9\-/#!,]+)(})",
bygroups(t.Operator, t.Keyword, t.Text, t.String, t.Operator),
),
(r"{", t.Operator),
(r"}", t.Operator),
(r".+?", t.Text),
],
"comment": [
(r"{", t.Comment.Multiline, "#push"),
(r"}", t.Comment.Multiline, "#pop"),
(r".+", t.Comment.Multiline),
],
}
lexers["rtf"] = RTFLexer(startinline=True)