[colorer/Colorer-schemes] master: add skill for hrd (98d05ca)

0 views
Skip to first unread message

farg...@farmanager.com

unread,
Sep 6, 2026, 10:01:05 AM (3 days ago) Sep 6
to farco...@googlegroups.com
Repository : https://github.com/colorer/Colorer-schemes
On branch : master
Link : https://github.com/colorer/Colorer-schemes/commit/98d05ca43d90db9da96d442b0df70c3138f0de07

>---------------------------------------------------------------

commit 98d05ca43d90db9da96d442b0df70c3138f0de07
Author: Aleksey Dobrunov <cta...@ctapmex.com>
Date: Sun Sep 6 18:47:22 2026 +0500

add skill for hrd


>---------------------------------------------------------------

98d05ca43d90db9da96d442b0df70c3138f0de07
.agents/skills/colorer-hrd-authoring/SKILL.md | 64 +++++++++
.agents/skills/colorer-hrd-authoring/examples.md | 116 +++++++++++++++++
.agents/skills/colorer-hrd-authoring/reference.md | 136 +++++++++++++++++++
.../colorer-hrd-authoring/scripts/validate.py | 144 +++++++++++++++++++++
4 files changed, 460 insertions(+)

diff --git a/.agents/skills/colorer-hrd-authoring/SKILL.md b/.agents/skills/colorer-hrd-authoring/SKILL.md
new file mode 100644
index 0000000..0a0da37
--- /dev/null
+++ b/.agents/skills/colorer-hrd-authoring/SKILL.md
@@ -0,0 +1,64 @@
+---
+name: colorer-hrd-authoring
+description: Create and maintain Colorer HRD style files (region-to-color maps). Use when adding or editing HRD themes, RGB/console palettes, catalog-rgb.xml, catalog-console.xml, or adapting editor themes (Monokai, Solarized, Dos Navigator).
+---
+
+# Colorer HRD Authoring
+
+HRD maps HRC region names (`def:Keyword`, …) to colors/styles. It does **not** define syntax.
+
+## Layout
+
+| Path | Role |
+|------|------|
+| `./base/hrd/rgb/` | GUI / truecolor. Edit here. |
+| `./base/hrd/console/` | 16-color VGA (`#0`–`#F`). Edit here. |
+| `./base/hrd/text/` | HTML generator (`stext`/`etext` tags). Rare. |
+| `./base/hrd/rgb/contrib/`, `./base/hrd/console/contrib/` | Third-party one-offs. |
+| `./base/hrd/catalog-rgb.xml` (and `-console`, `-text`) | Catalog fragments (entity-included). |
+| `./base/hrd/css/` | Generated from RGB at full `src` build. Newer RGB themes often have **no** committed CSS (`far2l`, popular palettes). Do not hand-edit. |
+| `./_build/base/` | After `./build.sh base`. Always `-c ./_build/base/catalog.xml`. |
+
+First-party palettes (Monokai, Solarized, FAR/DN, …) live in `rgb/` and `console/` roots, not `contrib/`. `./build.sh base` copies `base/hrd` as-is.
+
+## Workflow
+
+1. **Class** — `rgb` (hex `#rrggbb`), `console` (`#0`–`#F`), or both. `-h` HTML uses **rgb**; `-v` viewer uses **console**. Same `name` is allowed in both classes.
+2. **Template** — complete style: `base/hrd/rgb/white.hrd` or `far2l.hrd` or a popular palette; minimal: `eclipse.hrd`. Console: `default.hrd` / `dnlike.hrd`. Full region list: [examples.md](examples.md).
+3. **Assign** — `def:Text` (fg **and** bg). Then numbers, strings, comments, symbols, keywords, tags, errors, pairs. See [reference.md](reference.md#inheritance).
+4. **Catalog** — add `<hrd>` to `catalog-rgb.xml` and/or `catalog-console.xml`. `name` is NMTOKEN (kebab-case, **no spaces**). Then **re-sort that file** by `description` (case-insensitive); 8-space indent on `<hrd>` / `</hrd>`.
+5. **Changelog** — `CHANGELOG.md` → `[Unreleased]` Added/Changed, `[hrd] …`.
+6. **Test** — `./build.sh base`, then the checks below.
+
+Adapting an external palette (VS Code, Sublime, FAR, …): use **only** colors from that source. Map editor default → `def:Text`, selection/cursor → `HorzCross` / `PairStart`. Keywords, strings, comments, numbers must differ from Text fg **and** bg. If the source already names VGA indices (`F_YELLOW`, `B_CYAN`), use those for the console twin (see [reference.md](reference.md#vga)).
+
+## Tests
+
+Always `./build.sh base` first (or `validate.py`, which builds).
+
+| Layer | Command | What it checks |
+|-------|---------|----------------|
+| Smoke | `python .agents/skills/colorer-hrd-authoring/scripts/validate.py <hrd> <class> <name> [sample]` | XML, catalog entry, optional `-h` |
+| HTML (rgb) | `./bin/colorer -c ./_build/base/catalog.xml -h -iNAME FILE [-t TYPE] [-ln]` | Inline colors by eye |
+| Viewer (console) | `./bin/colorer -c ./_build/base/catalog.xml -v -iNAME FILE` | 16-color |
+| Load | `./build.sh test.load` | Catalog load; success = `✅ Success: there are no unknown errors in the log.` |
+
+HRD changes do **not** require `test.parse` goldens (`-ht` is region classes, not this palette).
+
+## Conventions
+
+- `name="theme-id"` kebab-case; `description` is the UI label (sort key).
+- `<?xml … UTF-8?>` + Colorer HRD take5 doctype + `xmlns="http://colorer.sf.net/2003/hrd"`.
+- Optional `<documentation>…</documentation>` before assigns. Console twin: append `, 16-color console approximation.`
+- `style`: `1` bold, `2` italic, `4` underline (bitmask; `3` = bold+italic). Modern dark themes: comments italic (`2`). Console may keep the same bits.
+- **Inheritance trap:** undeclared region → parent HRD colors. Declared region **missing** `fore`/`back` → runtime fill (`def:Text`), **not** the parent. Either omit the child or set its colors.
+- Children that share a parent color (all `Number*`) may repeat the same `fore`. `ParameterUnknown` must not equal Text fg on light themes (white-on-white).
+- `HorzCross` = current line; `VertCross` = column. Distinct `back` from `def:Text`.
+- Popular RGB → console: [reference.md](reference.md#rgb-to-console). Near-black bg → `#0`, near-white → `#F` (do not turn Solarized Dark into cyan). Then keep keyword/string/comment/number distinct from fg/bg; comments prefer `#8` over `#F`.
+- Do not invent CSS under `base/hrd/css/` for new RGB themes unless the user asks.
+
+## Resources
+
+- [examples.md](examples.md) — RGB/console templates, catalog entry
+- [reference.md](reference.md) — regions, inheritance, VGA, console mapping
+- HRC regions live in `base/hrc/lib/def.hrc`; syntax skill: `colorer-hrc-authoring`
diff --git a/.agents/skills/colorer-hrd-authoring/examples.md b/.agents/skills/colorer-hrd-authoring/examples.md
new file mode 100644
index 0000000..387611f
--- /dev/null
+++ b/.agents/skills/colorer-hrd-authoring/examples.md
@@ -0,0 +1,116 @@
+# HRD examples
+
+## Catalog entry
+
+```xml
+ <hrd class="rgb" name="my-theme" description="My Theme">
+ <location link="&hrd;/rgb/my-theme.hrd"/>
+ </hrd>
+```
+
+Console: `class="console"`, `link="&hrd;/console/my-theme.hrd"`. Same `name` in both catalogs is fine.
+
+Then re-sort that catalog file by `description` (case-insensitive).
+
+## Complete RGB (copy and recolor)
+
+Structure used by popular palettes (`monokai.hrd`, `dn.hrd`, …). Replace hex values; keep region names.
+
+```xml
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE hrd PUBLIC "-//Cail Lomecb//DTD Colorer HRD take5//EN"
+ "http://colorer.sf.net/2003/hrd.dtd">
+<hrd xmlns="http://colorer.sf.net/2003/hrd">
+ <documentation>
+ Short palette credit (editor / author).
+ </documentation>
+
+ <assign name="def:Text" fore="#c5c8c6" back="#1d1f21"/>
+ <assign name="def:HorzCross" fore="#c5c8c6" back="#282a2e"/>
+ <assign name="def:VertCross" fore="#c5c8c6" back="#282a2e"/>
+
+ <assign name="def:Number" fore="#de935f"/>
+ <assign name="def:String" fore="#b5bd68"/>
+ <assign name="def:StringContent" fore="#8abeb7"/>
+ <assign name="def:StringEdge" fore="#b5bd68"/>
+ <assign name="def:Character" fore="#b5bd68"/>
+
+ <assign name="def:Comment" fore="#969896" style='2'/>
+ <assign name="def:LineComment" fore="#969896" style='2'/>
+ <assign name="def:CommentDoc" fore="#a7aaa8" style='2'/>
+
+ <assign name="def:Symbol" fore="#c5c8c6"/>
+ <assign name="def:SymbolStrong" fore="#b294bb"/>
+ <assign name="def:Operator" fore="#8abeb7"/>
+ <assign name="def:Prefix" fore="#8abeb7"/>
+
+ <assign name="def:Keyword" fore="#b294bb"/>
+ <assign name="def:KeywordStrong" fore="#b294bb"/>
+ <assign name="def:TypeKeyword" fore="#f0c674"/>
+ <assign name="def:ClassKeyword" fore="#f0c674"/>
+ <assign name="def:FunctionKeyword" fore="#81a2be"/>
+ <assign name="def:DeprecatedKeyword" fore="#969896" style='4'/>
+
+ <assign name="def:Function" fore="#81a2be"/>
+ <assign name="def:Constant" fore="#de935f"/>
+ <assign name="def:BooleanConstant" fore="#de935f"/>
+ <assign name="def:Var" fore="#cc6666"/>
+ <assign name="def:VarStrong" fore="#cc6666"/>
+ <assign name="def:Identifier" fore="#c5c8c6"/>
+
+ <assign name="def:Directive" fore="#b294bb"/>
+ <assign name="def:Parameter" fore="#cc6666"/>
+ <assign name="def:ParameterUnknown" fore="#cc6666"/>
+
+ <assign name="def:Tag" fore="#cc6666"/>
+ <assign name="def:OpenTag" fore="#cc6666"/>
+ <assign name="def:CloseTag" fore="#cc6666"/>
+
+ <assign name="def:Label" fore="#81a2be"/>
+ <assign name="def:LabelStrong" fore="#1d1f21" back="#f0c674"/>
+
+ <assign name="def:Insertion" fore="#c5c8c6" back="#161719"/>
+ <assign name="def:InsertionStart" fore="#b294bb" back="#f0c674"/>
+ <assign name="def:InsertionEnd" fore="#b294bb" back="#f0c674"/>
+
+ <assign name="def:Error" fore="#c5c8c6" back="#cc6666" style='1'/>
+ <assign name="def:ErrorText" fore="#cc6666"/>
+ <assign name="def:TODO" fore="#1d1f21" back="#f0c674" style='1'/>
+ <assign name="def:Debug" fore="#1d1f21" back="#8abeb7"/>
+
+ <assign name="def:URI" fore="#81a2be" style='4'/>
+ <assign name="def:URL" fore="#81a2be" style='4'/>
+ <assign name="def:Path" fore="#b5bd68"/>
+ <assign name="def:EMail" fore="#81a2be" style='4'/>
+
+ <assign name="def:Date" fore="#de935f"/>
+ <assign name="def:Time" fore="#de935f"/>
+
+ <assign name="def:PairStart" fore="#c5c8c6" back="#373b41"/>
+ <assign name="def:PairEnd" fore="#c5c8c6" back="#373b41"/>
+ <assign name="def:PairStrongStart" fore="#1d1f21" back="#81a2be"/>
+ <assign name="def:PairStrongEnd" fore="#1d1f21" back="#81a2be"/>
+</hrd>
+```
+
+Expand `Number*` / `Comment*` siblings when the palette distinguishes them; otherwise Colorer inherits from the parent **if the child is not listed**.
+
+## Console twin of a gray FAR / DN editor
+
+Editor default is LIGHTGRAY on DARKGRAY. Map with the VGA table in [reference.md](reference.md#vga), not Euclidean RGB:
+
+```xml
+ <assign name="def:Text" fore="#7" back="#8"/>
+ <assign name="def:HorzCross" fore="#F" back="#3"/>
+ <assign name="def:VertCross" fore="#E" back="#1"/>
+ <assign name="def:Keyword" fore="#E" style='1'/>
+ <assign name="def:String" fore="#4"/>
+ <assign name="def:Number" fore="#B"/>
+ <assign name="def:Comment" fore="#3"/>
+```
+
+See `base/hrd/rgb/dn.hrd` and `base/hrd/console/dn.hrd` for a full pair.
+
+## Minimal RGB
+
+`eclipse.hrd` only overrides what must differ from Text; everything else inherits. Use when matching a sparse IDE theme, not a full editor palette.
diff --git a/.agents/skills/colorer-hrd-authoring/reference.md b/.agents/skills/colorer-hrd-authoring/reference.md
new file mode 100644
index 0000000..17e3129
--- /dev/null
+++ b/.agents/skills/colorer-hrd-authoring/reference.md
@@ -0,0 +1,136 @@
+# HRD reference
+
+## Inheritance
+
+Colorer looks up HRD in this order:
+
+1. Exact `assign name="type:Region"` in the loaded HRD set (later assign wins).
+2. If the region is **not** in HRD at all → walk the HRC **parent** chain (`NumberHex` → `Number` → …).
+3. If the region **is** in HRD but `fore` or `back` is omitted → transparent; fill comes from the **runtime scheme background** (`def:Text` at top level), not from the HRC parent.
+
+Practical rule: omit unused children, **or** give them `fore`. Never declare `<assign name="def:Keyword"/>` with no colors.
+
+`def:Text` must set both `fore` and `back` (editor default).
+
+## `style` bits
+
+| Bit | Value | CSS |
+|-----|-------|-----|
+| bold | 1 | `font-weight: bold` |
+| italic | 2 | `font-style: italic` |
+| underline | 4 | `text-decoration: underline` |
+
+Combine: `3` = bold+italic. Attribute is a single digit in the XSD.
+
+## `def:*` regions
+
+From `base/hrc/lib/def.hrc`. Assign at least the **bold** parents; children inherit if omitted.
+
+| Region | Role in a palette |
+|--------|-------------------|
+| `Text` | Default fg/bg |
+| `HorzCross` / `VertCross` | Current line / column (`back` ≠ Text `back`) |
+| `Number` (+ Dec/Hex/Bin/Oct/Float/Suffix/Prefix) | Numbers |
+| `String` / `StringContent` / `StringEdge` | String, escapes, quotes |
+| `Character` / `CharacterContent` | `'x'` |
+| `Comment` / `LineComment` / `CommentContent` / `CommentEdge` | Comments |
+| `CommentDoc*` | Doc comments (`/**`, `///`) |
+| `Symbol` / `SymbolStrong` / `Operator` | Punctuation / operators |
+| `Prefix` / `PrefixStrong` | `++`, `*`, language prefixes |
+| `Keyword` / `KeywordStrong` | Keywords |
+| `TypeKeyword` / `ClassKeyword` / `StructKeyword` / `FunctionKeyword` / `InterfaceKeyword` | Types / class / fn-as-keyword |
+| `DeprecatedKeyword` | Often underline (`style='4'`) |
+| `Constant` / `BooleanConstant` | `true` / `NULL` |
+| `Function` | Function **definition** (outlined; many schemes never hit this) |
+| `Var` / `VarStrong` / `Identifier` | Variables / names |
+| `Register` | ASM registers |
+| `Directive*` | Preprocessor |
+| `Parameter*` | XML attrs, params; `ParameterUnknown` = error-ish, not Text fg |
+| `Tag` / `OpenTag` / `CloseTag` / `EmbeddedTag` | Markup |
+| `Label` / `LabelStrong` | Labels; Strong often inverted bg |
+| `Insertion*` | Embedded language (PHP in HTML): slightly different `back` |
+| `Error` / `ErrorText` / `TODO` / `Debug` | Diagnostics (`Error` usually fg+bg) |
+| `URI` / `URL` / `Path` / `EMail` | Links (often `style='4'`) |
+| `Date` / `Time` | Dates |
+| `PairStart` / `PairEnd` | Matching brackets |
+| `PairStrongStart` / `PairStrongEnd` | Blocked / nested pair |
+
+Do not assign `def:default` (transparent). `def:Syntax` / `def:Special` / `def:Outlined` are usually omitted.
+
+Typical TextMate/VS Code → Colorer:
+
+| Scope | Region |
+|-------|--------|
+| comment | `Comment` (doc → `CommentDoc`) |
+| string | `String` (escape → `StringContent`) |
+| constant.numeric | `Number` |
+| keyword | `Keyword` |
+| storage.type / entity.name.class | `TypeKeyword` / `ClassKeyword` |
+| entity.name.function | `Function` / `FunctionKeyword` |
+| variable | `Var` |
+| keyword.operator | `Operator` |
+| entity.name.tag | `Tag` |
+| entity.other.attribute-name | `Parameter` |
+| invalid | `Error` |
+
+## VGA {#vga}
+
+Console HRD uses one hex digit. FAR / VGA `B_*` / `F_*` names:
+
+| Index | Name | RGB |
+|-------|------|-----|
+| `#0` | BLACK | `#000000` |
+| `#1` | BLUE | `#0000AA` |
+| `#2` | GREEN | `#00AA00` |
+| `#3` | CYAN | `#00AAAA` |
+| `#4` | RED | `#AA0000` |
+| `#5` | MAGENTA | `#AA00AA` |
+| `#6` | BROWN | `#AA5500` |
+| `#7` | LIGHTGRAY | `#AAAAAA` |
+| `#8` | DARKGRAY | `#555555` |
+| `#9` | LIGHTBLUE | `#5555FF` |
+| `#A` | LIGHTGREEN | `#55FF55` |
+| `#B` | LIGHTCYAN | `#55FFFF` |
+| `#C` | LIGHTRED | `#FF5555` |
+| `#D` | LIGHTMAGENTA | `#FF55FF` |
+| `#E` | YELLOW | `#FFFF55` |
+| `#F` | WHITE | `#FFFFFF` |
+
+When the source already uses those names, copy them (`F_RED` → `#4`, not `#C`; `F_YELLOW` → `#E`; `B_CYAN` → `#3`; LIGHTGRAY on DARKGRAY → `#7` / `#8`).
+
+## RGB → console {#rgb-to-console}
+
+Do **not** use raw Euclidean RGB on backgrounds: `#002b36` (Solarized Dark) is a dark teal and snaps to cyan `#3`. Use luminance first.
+
+1. Parse `#rrggbb` → HLS.
+2. If `L < 0.16` → `#0`. If `L > 0.82` → `#F`.
+3. If saturation `< 0.22` → gray ramp `#8` / `#7` / `#F`.
+4. Else hue buckets: red `#4`, orange/yellow `#6` (bright yellow `#E` or `#C`), green `#2`, cyan `#3`, blue `#1`, magenta `#5`; add 8 if light.
+5. Force `def:Text` fg ≠ bg. `HorzCross`/`VertCross` `back` ≠ Text `back`.
+6. Uniquify in order: Keyword, String, Comment, Number — each `fore` must not equal Text fg/bg or a previous role. If the original was gray, prefer `#8` before `#F` (white comments on black are unreadable).
+7. After uniquifying a parent (`Number`), copy that index to siblings that shared the old color (`NumberDec`, …).
+
+`def:Text` fg/bg define the theme (black `#0`, gray editor `#7`/`#8`, cyan DN `#0`/`#3`, light `#8`/`#F` or `#0`/`#F`).
+
+## Catalog
+
+Fragments have **no** XML root; they are `&catalog-rgb;` inside `base/catalog.base.xml`.
+
+```xml
+ <hrd class="rgb" name="my-theme" description="My Theme">
+ <location link="&hrd;/rgb/my-theme.hrd"/>
+ </hrd>
+```
+
+`class` matches the folder. `name` = filename without `.hrd` when possible. After insert or description edit, sort **all** `<hrd>…</hrd>` in that file by `description.casefold()`, keep eight spaces on the wrapper tags. Multiple `<location>` on one entry are allowed (`gray` stacks two files).
+
+`stext` / `etext` / `sback` / `eback` are for `text` class (HTML wrappers), not rgb/console colors.
+
+## Colorer CLI
+
+```
+./bin/colorer -c ./_build/base/catalog.xml -h -imonokai -t python FILE
+./bin/colorer -c ./_build/base/catalog.xml -v -idn FILE
+```
+
+`-i` is the catalog `name`. `-h` always loads class `rgb`.
diff --git a/.agents/skills/colorer-hrd-authoring/scripts/validate.py b/.agents/skills/colorer-hrd-authoring/scripts/validate.py
new file mode 100644
index 0000000..3a68ecd
--- /dev/null
+++ b/.agents/skills/colorer-hrd-authoring/scripts/validate.py
@@ -0,0 +1,144 @@
+#!/usr/bin/env python3
+"""Validate a Colorer HRD style and its catalog entry."""
+
+from __future__ import annotations
+
+import re
+import subprocess
+import sys
+from pathlib import Path
+from xml.etree import ElementTree as ET
+
+REPO_ROOT = Path(__file__).resolve().parents[4]
+CATALOG = REPO_ROOT / "_build" / "base" / "catalog.xml"
+COLORER = REPO_ROOT / "bin" / "colorer"
+BUILD_SH = REPO_ROOT / "build.sh"
+CATALOG_FILES = {
+ "rgb": REPO_ROOT / "base" / "hrd" / "catalog-rgb.xml",
+ "console": REPO_ROOT / "base" / "hrd" / "catalog-console.xml",
+ "text": REPO_ROOT / "base" / "hrd" / "catalog-text.xml",
+}
+
+
+def ensure_built_catalog() -> str | None:
+ result = subprocess.run(
+ [str(BUILD_SH), "base"],
+ cwd=REPO_ROOT,
+ capture_output=True,
+ text=True,
+ timeout=300,
+ )
+ if result.returncode != 0:
+ return f"build.sh base failed: {result.stderr or result.stdout}"
+ if not CATALOG.exists():
+ return f"built catalog not found after build: {CATALOG}"
+ return None
+
+
+def xml_well_formed(hrd_path: Path) -> str | None:
+ text = hrd_path.read_text(encoding="utf-8")
+ stripped = re.sub(r"<!DOCTYPE[^>]*>", "", text, count=1)
+ try:
+ ET.fromstring(stripped)
+ return None
+ except ET.ParseError as e:
+ return f"XML parse error: {e}"
+
+
+def catalog_registered(hrd_class: str, name: str) -> tuple[bool, str | None]:
+ path = CATALOG_FILES.get(hrd_class)
+ if path is None:
+ return False, f"unknown class {hrd_class!r} (rgb|console|text)"
+ text = path.read_text(encoding="utf-8")
+ ok = bool(
+ re.search(
+ rf'<hrd\s+class="{re.escape(hrd_class)}"\s+name="{re.escape(name)}"',
+ text,
+ )
+ )
+ return ok, None
+
+
+def colorer_html(sample: Path, name: str, output: Path) -> str | None:
+ result = subprocess.run(
+ [
+ str(COLORER),
+ "-c",
+ str(CATALOG),
+ "-h",
+ f"-i{name}",
+ str(sample),
+ "-o",
+ str(output),
+ "-db",
+ ],
+ capture_output=True,
+ text=True,
+ timeout=60,
+ )
+ if result.returncode != 0:
+ return f"colorer -h failed: {result.stderr or result.stdout}"
+ return None
+
+
+def main() -> int:
+ if len(sys.argv) < 4:
+ print(
+ f"Usage: {sys.argv[0]} <hrd-file> <class> <name> [sample-file] [output-html]",
+ file=sys.stderr,
+ )
+ return 2
+
+ hrd_path = Path(sys.argv[1])
+ hrd_class = sys.argv[2]
+ name = sys.argv[3]
+ sample = Path(sys.argv[4]) if len(sys.argv) > 4 else None
+ output = Path(sys.argv[5]) if len(sys.argv) > 5 else Path("/tmp") / f"hrd-{name}.html"
+
+ errors: list[str] = []
+ if not hrd_path.is_file():
+ errors.append(f"missing file: {hrd_path}")
+ else:
+ err = xml_well_formed(hrd_path)
+ if err:
+ errors.append(err)
+
+ ok, cat_err = catalog_registered(hrd_class, name)
+ if cat_err:
+ errors.append(cat_err)
+ elif not ok:
+ errors.append(f"{name!r} not in catalog-{hrd_class}.xml")
+
+ if errors:
+ print("FAIL")
+ for e in errors:
+ print(f" {e}")
+ return 1
+
+ build_err = ensure_built_catalog()
+ if build_err:
+ print("FAIL")
+ print(f" {build_err}")
+ return 1
+
+ if sample is not None:
+ if hrd_class != "rgb":
+ print("WARN: -h uses rgb class; skip HTML for console/text")
+ elif not sample.is_file():
+ print("FAIL")
+ print(f" missing sample: {sample}")
+ return 1
+ else:
+ html_err = colorer_html(sample, name, output)
+ if html_err:
+ print("FAIL")
+ print(f" {html_err}")
+ return 1
+ print(f"html {output}")
+
+ print(f"OK {hrd_class}/{name}")
+ return 0
+
+
+if __name__ == "__main__":
+ raise SystemExit(main())


Reply all
Reply to author
Forward
0 new messages