diff --git a/README.md b/README.md index c5c7766..d0ae3d5 100644 --- a/README.md +++ b/README.md @@ -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": "", - "license": "MIT", - "source": "" - } - ] -} -``` +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": "", "license": "MIT", "source": "" } +``` diff --git a/grammars/.gitkeep b/grammars/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/index.json b/index.json index 09f683a..c617476 100644 --- a/index.json +++ b/index.json @@ -1,4 +1,7 @@ { "version": 1, - "grammars": [] + "grammars": [], + "plugins": [], + "themes": [], + "templates": [] } diff --git a/plugins/.gitkeep b/plugins/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/.gitkeep b/templates/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/themes/.gitkeep b/themes/.gitkeep new file mode 100644 index 0000000..e69de29