فهرست منبع

say what the repository's definitions/ is for now that it is only built in

definitions/README.md still described the directory the tool reads at runtime:
`definition fetch` put a file there and a file dropped in by hand was used. Since
the last commit neither is true — fetch writes to the per-user directory, and a
file here takes effect only after a rebuild — so the README now says it holds
the files embedded into the binary, when a file belongs here, and where each one
is from. What it repeated from embed.go and the top-level README is gone.

The top-level README linked it as saying what belongs in the per-user
directory; the link now names it as the vendored copy read at build time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul-Dieter Klumpp 1 هفته پیش
والد
کامیت
09be4e1294
2فایلهای تغییر یافته به همراه16 افزوده شده و 45 حذف شده
  1. 4 4
      README.md
  2. 12 41
      definitions/README.md

+ 4 - 4
README.md

@@ -66,10 +66,10 @@ last, so an installed tool has it; see
 
 A file already in the per-user `definitions/` directory is used for its own board
 without any argument, so **to use a definition you have already, put it in that
-directory** or pass it with `--definition <path>`;
-[`definitions/README.md`](definitions/README.md) says what belongs there. The Wobkey
-Impact 80's file is vendored *and* built into the binary, because that board is
-not in VIA's collection and so cannot be fetched at all.
+directory** or pass it with `--definition <path>`. The Wobkey Impact 80's file is
+vendored in the repository's [`definitions/`](definitions/README.md) and built into
+the binary, because that board is not in VIA's collection and so cannot be fetched
+at all; that directory is read only at build time.
 
 Without a definition the keyboard is still fully driven with `brightness`, `speed`,
 `color`, `effect <index>` and `info` — only the effect names are missing, and

+ 12 - 41
definitions/README.md

@@ -1,52 +1,23 @@
 # Definitions
 
-VIA definition files. A keyboard holds effect numbers, not names, and the names
-live in one of these — the same file VIA reads when you open a board in its web
-app, which is why the tool depends on them the way VIA does.
+The VIA definition files built into the binary. `embed.go` embeds every JSON file
+in this directory, so that `go install` delivers them: it copies a binary and
+creates no data directory, and a board VIA does not carry cannot be fetched.
 
-## What belongs here
-
-One JSON file per keyboard, and a file is used for the board whose
-`vendorId`/`productId` it carries, so the name of the file does not matter. A
-file for another board is refused by name rather than used, because applying one
-board's effect names to another board writes wrong IDs.
+This is not the directory the tool reads at runtime. That is the per-user
+`definitions/` directory the top-level README names; `definition fetch` writes
+there, and a file placed there — or passed with `--definition` — takes precedence
+over the one built in. To use or correct a definition, put it there, not here.
 
-`qmk-rgb-tool definition fetch` puts a file here for the connected keyboard.
-Drop one in by hand when the vendor publishes one and VIA does not carry it.
+## What belongs here
 
-This is the repository's own copy, and it is the one built into the binary. At
-runtime the tool reads the per-user `definitions/` directory instead — the table
-in the top-level README names it — so a file you fetch is found, and a file you
-want to correct the built-in copy with goes there.
+A board's file, only when VIA's own collection does not carry that board, kept as
+the vendor serves it. A file is matched to a board by the `vendorId`/`productId`
+it carries, so its name does not matter. A file added here takes effect after a
+rebuild.
 
 ## The files here
 
 | File | Board | From |
 |------|-------|------|
 | `impact80.json` | Wobkey Impact 80 | [the vendor's Driver & Firmware page](https://wiki.wobkey.com/en/Products/PMOKEY-Impact-80/Driver-Firmware), which links it as the Impact 80 VIA JSON |
-
-Wobkey's file is the vendor's own, kept as it is served. It names three lighting
-channels — `logo`, `Backlight`, `side` — and their effect lists: 7, 46 and 7
-entries, IDs 0 to 6, 0 to 45 and 0 to 6.
-
-This board is **not** in VIA's own collection, so `definition fetch` cannot get
-it. That is why the file is here rather than fetched.
-
-`embed.go` builds the JSON files in this directory into the binary, so that
-`go install` delivers them: it copies a binary to `$GOPATH/bin` and creates no
-data directory, so without that an installed tool would find no definition for
-this board and no way to fetch one. The file is embedded, not copied — there is
-one file here, and a file placed in a definitions directory at runtime takes
-precedence over it.
-
-## Two things a file does not tell the tool
-
-The names it carries are the manufacturer's spelling, which need not be the
-tool's. The tool's aliases and its own spellings resolve alongside them — a
-definition writing `fixed wave` still answers to `fixed_wave` — and
-`qmk-rgb-tool info` reports whichever spelling the source in use has.
-
-A file also names only the effects a board's firmware implements, so it may
-stop short of the board's highest effect ID. This one's backlight channel stops
-at 45 while the board takes ID 46 as well, which no source names: the tool
-reports it as `unknown` rather than inventing a word for it.