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 b17a8b6
Browse filesBrowse the repository at this point in the historyBrowse files
Credits audit page: paste a credits file or URLs, see what each owes (#187)
- audit/ (lib/audit-page.mjs, public/audit.js), linked from every footer
and in the sitemap; everything runs in the browser
- lib/credits-audit.mjs (served as credits-audit.js) matches each line:
by the longest catalog URL prefix, else as a candidate list for a site
the catalog knows, else by an entry name or a publisher named on the
line (5+ characters, whole words). An entry whose url is a filtered
listing (?series=...) matches only itself
- per line: licence, credit line, non-commercial, per-file, engine lock,
status and open question, verified date; unknown lines say to check by
hand and link the new-source form
- the settled matches' obligations, and CREDITS.md from the shared
creditsFile (now told where it came from: madeFrom)
Checked in a browser with a 20-line mixed file: 16 matched, 4 unknown,
CREDITS.md downloads, no console errors.
Closes#187
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LpkeXQPaUhxjgqdqnk6BrJ
<div class="entry-lead"><p>Paste a credits file, or one asset URL per line. Each line is matched to the catalog: by the source's URL, by the site it came from, or by the source's name. Nothing leaves your browser.</p></div>
31
+
<noscript><p>The audit runs in your browser and needs JavaScript. Without it, search the <a href="../#catalog">catalog</a> for each source.</p></noscript>
32
+
<form class="audit-form" id="audit-form">
33
+
<label for="audit-input">Credits file or URLs</label>
34
+
<textarea id="audit-input" rows="12" spellcheck="false" placeholder="https://kenney.nl/assets/ui-pack Music: Kevin MacLeod (incompetech.com)"></textarea>
35
+
<p><button type="submit" class="btn">Check what these owe</button></p>
<p class="filter-note">A line the catalog does not know is not a verdict on it: read its licence yourself, or <a href="${esc(repo)}/issues/new?template=new-source.yml" rel="noopener noreferrer">suggest the source</a>.</p>
Copy file name to clipboardExpand all lines: site/lib/owes.mjs
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -97,7 +97,7 @@ export function copyAllText(owed) {
97
97
* Every section a stack page shows is here, so nothing owed is dropped on the
98
98
* way from the shortlist to the game's repository.
99
99
*/
100
-
exportfunctioncreditsFile(owed,{ format ="md", pageUrl =()=>"", date ="", source ="Free Game Dev Assets"}={}){
100
+
exportfunctioncreditsFile(owed,{ format ="md", pageUrl =()=>"", date ="", source ="Free Game Dev Assets", madeFrom ="a shortlist"}={}){
101
101
constmd=format==="md";
102
102
constout=[];
103
103
constheading=(text)=>{
@@ -112,7 +112,7 @@ export function creditsFile(owed, { format = "md", pageUrl = () => "", date = ""
112
112
out.push(md ? "# Credits" : "CREDITS\n=======");
113
113
out.push(
114
114
"",
115
-
`Made from a shortlist on ${source}${date ? ` on ${date}` : ""}. Each licence was checked at its source on the date its catalog entry shows. This is the catalog's reading, not legal advice: re-read the source before you ship.`
115
+
`Made from ${madeFrom} on ${source}${date ? ` on ${date}` : ""}. Each licence was checked at its source on the date its catalog entry shows. This is the catalog's reading, not legal advice: re-read the source before you ship.`
<p>Catalog metadata is CC0. Linked assets keep their own licences. This is the catalog's reading of each licence, not legal advice: re-check the live source before shipping.</p>
if(e.attribution_required===true)bits.push(e.attribution_string ? `credit: <code>${escapeHtml(e.attribution_string)}</code>` : "credit required: see the entry");
if(v.via==="none")return`<li class="audit-none">${line}<br />Not in the catalog: check this one by hand.</li>`;
34
+
if(v.via==="site"||v.entries.length>1){
35
+
constn=v.entries.length;
36
+
constlead=v.via!=="site" ? "More than one source matches:" : n===1 ? "The catalog has one source on this site; is it this one?" : `The catalog has ${n} sources on this site; which one?`;
0 commit comments