Single-source the scheduler help from markdown the AI index can read
This commit is contained in:
+2
-2
@@ -145,8 +145,8 @@ done
|
||||
# misleading failure this tool can produce.
|
||||
if [[ -n "$KIND" ]]; then
|
||||
case "$KIND" in
|
||||
header|readme|manual|template|doc) ;;
|
||||
*) echo "Unknown --kind=$KIND (expected: header, readme, manual, template, doc)" >&2
|
||||
header|readme|manual|template|doc|ui) ;;
|
||||
*) echo "Unknown --kind=$KIND (expected: header, readme, manual, template, doc, ui)" >&2
|
||||
exit 1 ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
+7
-1
@@ -213,6 +213,12 @@ function capSize(chunks) {
|
||||
function classify(rel) {
|
||||
const base = path.basename(rel);
|
||||
if (rel.startsWith('Deployment/') && rel.endsWith('.template')) return 'template';
|
||||
// WebGUI page docs, written for whoever is using the tab rather than maintaining it. Their
|
||||
// own kind because every other kind here answers a maintainer's question: an operator asking
|
||||
// "how do I stop this" needs the click path, and a corpus that is three-quarters script
|
||||
// headers will otherwise always answer in conf edits. Matched on the folder, not the
|
||||
// filename, so these can be named whatever reads best.
|
||||
if (rel.startsWith('Plugin/unraid/pages/readme/') && base.endsWith('.md')) return 'ui';
|
||||
if (base.endsWith('.md')) {
|
||||
if (base.startsWith('Manual')) return 'manual';
|
||||
if (base.startsWith('README') || base === 'README.md') return 'readme';
|
||||
@@ -237,7 +243,7 @@ function chunkFile(absPath, rel) {
|
||||
} else if (kind === 'template') {
|
||||
raw = sectionsFromConfTemplate(text)
|
||||
.map(s => ({ section: null, heading: s.heading, content: s.content }));
|
||||
} else if (kind === 'readme' || kind === 'manual' || kind === 'doc') {
|
||||
} else if (kind === 'readme' || kind === 'manual' || kind === 'doc' || kind === 'ui') {
|
||||
raw = sectionsFromMarkdown(text)
|
||||
.map(s => ({ section: null, heading: s.heading, content: s.content }));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user