brain backup 2026-09-14

This commit is contained in:
Adolfo Reyna
2026-09-14 22:38:47 -04:00
parent ca346cc6e7
commit f0ead4f6fa
147 changed files with 73451 additions and 8 deletions
@@ -0,0 +1,20 @@
export function isGradeThreeSource(source) {
return /\bGrade 3\b/i.test(source.title ?? '') || /(?:^|[_-])G3(?:[_-]|$)/i.test(source.filename ?? '');
}
export function classifyUnit(filename) {
const name = String(filename);
if (/CKMath/i.test(name)) return 'Math';
if (/CKSci/i.test(name)) return 'Science';
if (/CKLA/i.test(name)) return 'Language Arts';
if (/CKHG|CKIYS|LABB_CKHG/i.test(name)) return 'History & Geography';
if (/CKMusic|CKVA/i.test(name)) return 'Arts';
return 'Other';
}
export function roleForPdf(filename) {
const name = String(filename);
if (/(?:^|[_-])(TG|TeacherGuide|Teacher[_ -]?Guide)(?:[_-]|\.)/i.test(name)) return 'Teacher Guide';
if (/(?:^|[_-])(SR|StudentReader|Student[_ -]?Reader|ActivityBook)(?:[_-]|\.)/i.test(name)) return 'Student Reader';
return 'Reference';
}