chore: registry layout, index schema and readme

This commit is contained in:
Marcos Paulo
2026-10-18 13:28:02 -03:00
parent 74493b6926
commit 790b8834b2
6 changed files with 25 additions and 24 deletions
+21 -23
View File
@@ -1,28 +1,26 @@
# notescraft-grammars
# notescraft-registry
Syntax grammars for NotesCraft. The app reads `index.json`, then downloads one grammar file from `grammars/` on demand.
Downloadable extras for NotesCraft: syntax grammars, plugins, themes and templates. The app reads `index.json`, then downloads one file on demand from the matching folder.
## index.json
```json
{
"version": 1,
"grammars": [
{
"name": "zig",
"aliases": ["zig"],
"file": "grammars/zig.sublime-syntax",
"format": "sublime-syntax",
"scope": "source.zig",
"size": 31000,
"sha256": "<hex digest of the file>",
"license": "MIT",
"source": "<upstream url>"
}
]
}
```
Four lists, one per folder: `grammars`, `plugins`, `themes`, `templates`. Every entry has:
- `format`: `sublime-syntax` (final format is confirmed by the app prototype).
- `size` is in bytes; the app rejects a file that differs from it or from `sha256`.
- Add only grammars whose license allows redistribution, and record it in `license` and `source`.
| Field | Meaning |
|---|---|
| `name` | Unique id inside its list (lowercase, `-` allowed) |
| `title` | Display name |
| `aliases` | Other names the app should match (grammars: fence labels) |
| `file` | Path inside this repository |
| `size` | Bytes; the app rejects a file that differs |
| `sha256` | Hex digest; the app rejects a file that differs |
| `license` | SPDX id; only redistributable work is added |
| `source` | Upstream URL |
Grammar entries also carry `format` (`sublime-syntax`, final format confirmed by the app prototype) and `scope` (for example `source.zig`).
```json
{ "name": "zig", "title": "Zig", "aliases": ["zig"], "file": "grammars/zig.sublime-syntax",
"format": "sublime-syntax", "scope": "source.zig", "size": 31000,
"sha256": "<hex digest>", "license": "MIT", "source": "<upstream url>" }
```
View File
+4 -1
View File
@@ -1,4 +1,7 @@
{
"version": 1,
"grammars": []
"grammars": [],
"plugins": [],
"themes": [],
"templates": []
}
View File
View File
View File