diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-14 22:11:42 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-14 22:11:42 -0500 |
| commit | a3f4aa86bdf9e92715a9480a2a18b4a2656265f6 (patch) | |
| tree | 57ce8acfa00a32452831bb6c5556283ab6d34e88 /scripts/theme-studio/generate.py | |
| parent | 8b9e7bc3dd3dcaaf108a01d0df65202c8ef458a4 (diff) | |
| download | dotemacs-a3f4aa86bdf9e92715a9480a2a18b4a2656265f6.tar.gz dotemacs-a3f4aa86bdf9e92715a9480a2a18b4a2656265f6.zip | |
refactor(theme-studio): derive the gate list and sentinel the samples split
run-tests.sh built its browser-gate list by hand, so a new gate could go unrun or a removed one stay listed (that drift hid the #familytest alias). It now derives the list from the gate blocks in browser-gates.js.
generate.py split samples.py on the first "cols=" substring to import only the data section, which would truncate at the wrong place if "cols=" ever appeared earlier. Both sides now use an explicit THEME_STUDIO_DATA_END marker.
Diffstat (limited to 'scripts/theme-studio/generate.py')
| -rw-r--r-- | scripts/theme-studio/generate.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/theme-studio/generate.py b/scripts/theme-studio/generate.py index 667e7b263..cc6a26f89 100644 --- a/scripts/theme-studio/generate.py +++ b/scripts/theme-studio/generate.py @@ -57,7 +57,7 @@ BROWSER_GATES_BODY=strip_exports(read_text('browser-gates.js')) COLOR_NAMES=read_json('color-names.json') ns={} src=read_text('samples.py') -exec(src[:src.index('cols=')], ns) +exec(src[:src.index('# THEME_STUDIO_DATA_END')], ns) SAMPLES={"Elisp":ns['ELS'],"Go":ns['GOS'],"Python":ns['PYS'],"TypeScript":ns['TSS'],"Java":ns['JAS'],"C":ns['CS'],"C++":ns['CPS'],"Rust":ns['RUSTS'],"Zig":ns['ZIGS'],"Shell":ns['SHS']} COLS=ns['COLS'] DEFAULT_FACES_PATH=os.path.join(HERE,'emacs-default-faces.json') |
