Repository navigation
Expand file tree
/
Copy pathrsconstruct.toml
More file actions
152 lines (122 loc) · 6.27 KB
/
Copy pathrsconstruct.toml
File metadata and controls
152 lines (122 loc) · 6.27 KB
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# rsconstruct build configuration for this repository.
[build]
# src_dirs entries name directories; "." (the whole tree) is a config error
reject_dot_src_dirs = true
# ─── analyzers ───────────────────────────────────────────────────────────────
[analyzer.tera]
[analyzer.python]
# ─── templating ──────────────────────────────────────────────────────────────
[processor.generator.tera]
src_dirs = ["tera.templates"]
# ─── the book ────────────────────────────────────────────────────────────────
# src/sk/*.sk are 3D scenes; sketch renders each one to TikZ code under
# out/src/sk/, where riddling.tex \inputs it.
[processor.generator.generic.sketch]
command = "scripts/wrapper_sketch.py"
src_dirs = ["src/sk"]
src_extensions = [".sk"]
output_dir = "out/src/sk"
output_extension = "tex"
batch = false
# The body of the book, out/src/riddles.tex: a chapter per category, each
# with its riddles from src/include/*.tex, ordered as scripts/build_riddles.py
# explains.
[processor.explicit.generic.riddles]
command = "scripts/build_riddles.py"
input_globs = ["src/include/*.tex"]
output_files = ["out/src/riddles.tex"]
# riddling.tex is one document assembled from out/src/riddles.tex, the
# riddles it \inputs from src/include/*.tex, and the sketch figures, and it lands in docs/ because GitHub Pages serves
# master:/docs. An explicit processor rather than generator.pdflatex: the
# figures do not exist on a cold build, and only input_globs can name another
# processor's outputs (dep_inputs only sees files already on disk), which is
# also what orders sketch before pdflatex.
[processor.explicit.generic.book]
command = "scripts/build_pdf.py"
inputs = ["src/tex/riddling.tex"]
input_globs = ["src/include/*.tex", "out/src/riddles.tex", "out/src/sk/*.tex"]
output_files = ["docs/riddling.pdf"]
required_tools = ["pdflatex"]
# lacheck on the whole book. It follows \input into the sketch figures, so,
# like the book, it is an explicit processor whose input_globs name them; the
# stamp file is its output. scripts/wrapper_lacheck.py makes warnings fail
# and lists the few that are wrong for this book.
[processor.explicit.generic.lacheck]
command = "scripts/wrapper_lacheck.py"
inputs = ["src/tex/riddling.tex"]
input_globs = ["src/include/*.tex", "out/src/riddles.tex", "out/src/sk/*.tex"]
output_files = ["out/lacheck.stamp"]
required_tools = ["lacheck"]
# every riddle has its category in parentheses at the end of its title
[processor.checker.script.categories]
command = "scripts/check_categories.py"
src_dirs = ["src/tex", "src/include"]
src_extensions = [".tex"]
# sketch and the TeX Live parts riddling.tex loads: hyperref (latex-base),
# thumbpdf (latex-recommended), tikz (pictures), pst-pdf (pstricks), and what
# pst-pdf itself requires: environ (latex-extra) and luatex85 (luatex, which
# none of the others depends on). Then the checkers' tools: lacheck, and aspell
# with its English dictionary.
[dependencies]
system = [
"sketch",
"texlive-latex-base",
"texlive-latex-recommended",
"texlive-latex-extra",
"texlive-pictures",
"texlive-pstricks",
"texlive-luatex",
"lacheck",
"aspell",
"aspell-en",
]
# The book's text. --mode must be on the command line: aspell ignores a `mode`
# line in the conf file. TeX mode skips commands but not math, so --ignore=2
# drops the one and two letter tokens math is made of ($M_{kj}$, $dx$), and the
# add-tex-command entries skip the arguments that are option names, not prose.
[processor.checker.aspell]
src_dirs = ["src/tex", "src/include"]
src_extensions = [".tex"]
args = [
"--mode=tex",
"--ignore=2",
"--add-tex-command=usepackage op",
"--add-tex-command=hypersetup p",
"--add-tex-command=definecolor pPp",
"--add-tex-command=usetikzlibrary p",
]
[processor.checker.ruff]
src_dirs = ["scripts", "instances"]
[processor.checker.pyrefly]
src_dirs = ["scripts", "instances"]
[processor.checker.iluacheck]
src_dirs = ["config"]
# ─── toml / yaml / json ──────────────────────────────────────────────────────
[processor.checker.taplo]
src_files = [".rumdl.toml", "pyproject.toml", "rsconstruct.toml"]
# lint the GitHub Actions workflow files with actionlint
[processor.checker.iactionlint]
src_dirs = [".github/workflows"]
# ─── markdown ────────────────────────────────────────────────────────────────
[processor.checker.rumdl]
src_dirs = ["doc"]
src_files = ["README.md"]
# ─── perl ────────────────────────────────────────────────────────────────────
[processor.checker.iperlcritic]
src_dirs = ["instances"]
# ─── c / c++ ─────────────────────────────────────────────────────────────────
# instances/print_stars is the riddle text verbatim: the unused and shadowed
# `i` are the puzzle, so those lines carry inline cppcheck-suppress comments
[processor.checker.cppcheck]
src_dirs = ["instances"]
args = [
"--error-exitcode=1",
"--enable=warning,style,performance,portability",
"--inline-suppr",
]
# ─── java ────────────────────────────────────────────────────────────────────
[processor.checker.icheckstyle]
src_dirs = ["instances/path"]
# ─── html ────────────────────────────────────────────────────────────────────
[processor.checker.itidy]
src_dirs = ["docs"]