You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fee00d5
Browse filesBrowse the repository at this point in the historyBrowse files
new-entry: draft an entry from a "New source" issue form
The New source form already collects the name, url, category, licence,
dated quote, commercial and credit answers and the credit line, and a
maintainer re-typed them by hand.
`npm run new-entry -- --from-issue <n> [--id <id>]` reads the form with a
read-only `gh issue view`. It maps the dropdowns to commercial and
attribution_required, and keeps a licence only if it is in the vocabulary;
anything else becomes unknown, with a warning. It fills license_spdx from
the vocabulary and puts the reporter's quote in Evidence, marked as
reported. The draft always starts needs-review, with subcategories, formats
and tags empty, so validate fails until a maintainer has read the source
and finished the entry.
The form parsing and draft are pure (scaffold.mjs) and tested, including
that the draft parses, has no unknown keys, and fails validate on the empty
lists. Checked: a non-form issue is refused, and the classic mode still
works.
Closes#212
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LpkeXRUqm7oDedPDk3QWtK
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ Please follow the [Code of Conduct](CODE_OF_CONDUCT.md).
32
32
The website rebuilds from frontmatter on deploy. Node 22 or newer is all you need (CI and
33
33
`.nvmrc` use 24); there are no dependencies to install.
34
34
35
-
1. Run `node site/new-entry.mjs <category> <id>` (or `npm run new-entry -- <category> <id>`). It copies [`catalog/TEMPLATE.md`](catalog/TEMPLATE.md) to `catalog/<category>/<id>.md` with the id, category and today's date filled in, and refuses an id already used anywhere in the catalog. Use a short kebab-case `id`; a mixed kit already listed in another category is a duplicate, not a second entry.
35
+
1. Run `node site/new-entry.mjs <category> <id>` (or `npm run new-entry -- <category> <id>`). It copies [`catalog/TEMPLATE.md`](catalog/TEMPLATE.md) to `catalog/<category>/<id>.md` with the id, category and today's date filled in, and refuses an id already used anywhere in the catalog. Use a short kebab-case `id`; a mixed kit already listed in another category is a duplicate, not a second entry. Maintainers can start from a "New source" issue instead: `npm run new-entry -- --from-issue <number> [--id <id>]` reads the form with `gh` and writes a `needs-review` draft with the reporter's answers and quote. Subcategories, formats and tags are left empty, so validate fails until someone has read the source and finished the entry.
36
36
2. Verify the license on the live source page the day you submit, and fill every frontmatter field from it (rules below). Prefer primary URLs over mirror/aggregator pages.
37
37
3. Write the body: a one-paragraph summary, `## Notes`, `## Evidence` with a dated line quoting the source, such as `- Live page (2026-09-25): "Free for commercial use"`, and optionally `## Related` linking sibling entries. Every Evidence section needs at least one date, and `verified` may not be newer than the newest one. The template (and so the scaffold) starts at `status: needs-review`; set `active` once the licence, the commercial stance and the credit requirement are all settled.
38
38
4. Add a row to the matching category `README.md`. This is required: the validator fails an entry that is not listed there, and the row's licence cell must match your frontmatter.
eq("from-issue: no warnings for a clean form",warnings.length,0);
1243
+
has("from-issue: the quote is the Evidence line",parsed.body,'- Reported in #42: Live licence page (2026-10-30): "Use it in games, credit Sound Co."');
1244
+
has("from-issue: a publisher submission is noted",parsed.body,"Submitted by the publisher (#42).");
1245
+
eq("from-issue: no unknown keys",checkKnownKeys("d.md",m).length,0);
1246
+
has("from-issue: validate fails until lists are filled",checkEntryBasics("catalog/audio/sound-pack-one.md",m,parsed.body,{stem: "sound-pack-one",dirName: "audio",categories: newSet(["audio"]),readmeText: "(sound-pack-one.md)",today: "2026-11-03"}).join(" "),"missing/empty: subcategories, formats, tags");
1247
+
constodd=entryFromIssue(template,{ ...form,"License as stated on the live page": "Royalty free!","Commercial / game use": "maybe","Licence quote and date": "no date here"},{id: "x",issue: 7,today: "2026-11-03", vocab });
1248
+
constom=parseFrontmatter(odd.text).meta;
1249
+
eq("from-issue: an unknown licence becomes unknown",om.license,"unknown");
1250
+
eq("from-issue: no SPDX for unknown",om.license_spdx,undefined);
1251
+
eq("from-issue: an unexpected dropdown answer is unknown",om.commercial,"unknown");
1252
+
eq("from-issue: no quote date means verified today",om.verified,"2026-11-03");
1253
+
eq("from-issue: both problems are warned about",odd.warnings.length,2);
console.log(`wrote ${rel}${fromIssue ? ` (draft from #${fromIssue})` : ""}
41
84
42
85
Next:
43
-
1. Fill every frontmatter field from the live source page (CONTRIBUTING.md,
44
-
"Frontmatter rules"), and replace the example body. Quote the licence in
45
-
## Evidence with today's date: (${today}).
86
+
1. ${fromIssue ? "Read the live source yourself and check every field the reporter gave; fill" : "Fill every frontmatter field from the live source page (CONTRIBUTING.md,\n \"Frontmatter rules\"), and replace the example body. Fill"} subcategories,
87
+
formats and tags. Quote the licence in ## Evidence with today's date: (${today}).
46
88
2. Add a row for [${id}.md](${id}.md) to catalog/${category}/README.md.
0 commit comments